小编Ser*_*aro的帖子

加载规则“jsx-a11y/alt-text”时出错:rule.create 不是函数

我刚刚用来 npx create-react-app my-app 启动一个项目,运行时npm start 我收到此编译错误

Error while loading rule 'jsx-a11y/alt-text': rule.create is not a function
Occurred while linting my-app/src/index.js
Run Code Online (Sandbox Code Playgroud)

javascript lint reactjs eslint

5
推荐指数
1
解决办法
1042
查看次数

CSS 每行一个字符

我需要 ia div 中写入的所有文本都是垂直的,就像每行一个字符并居中。

我实现的唯一方法是给 div 一个固定的宽度width: 7%;word-break: break-all;

有什么方法可以使用 CSS 来实现没有固定宽度的效果吗?

.flex-container {
    display: flex;
    border: 1px solid #000000;
}

.flex-container > div {
    width: 400px;
    height: 300px;
    text-align: center;
    line-height: 75px;
    font-size: 30px;
}

.flex-container > div:nth-child(odd) {
    background-color : #62d962;
}

.flex-container > div:last-child {
    display: flex;
    justify-content: flex-end;
}

.flex-container > div:last-child div {
    width: 7%;
}

.flex-container div:last-child div:nth-child(odd){
    background-color: #65e9e3;
    word-break: break-all;
    line-height: 1em;
    padding: 1em 0;
}
Run Code Online (Sandbox Code Playgroud)
<div class="flex-container">
  <div></div> …
Run Code Online (Sandbox Code Playgroud)

html css flexbox

0
推荐指数
1
解决办法
804
查看次数

标签 统计

css ×1

eslint ×1

flexbox ×1

html ×1

javascript ×1

lint ×1

reactjs ×1