作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
最佳答案
你可以这样做:
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: #111;
}
.flex {
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
width: 836px;
max-width: 100%;
height: 478px;
margin: 0 auto;
background: #fff;
}
.flex > span {
width: 33.33%;
font-size: 6em;
font-weight: bold;
font-family: sans-serif;
text-align: center;
}
.flex > span:nth-child(8) {
visibility: hidden;
}
<div class="flex">
<span>S</span>
<span>T</span>
<span>R</span>
<span>E</span>
<span>N</span>
<span>G</span>
<span>T</span>
<span>hidden</span>
<span>H</span>
</div>
关于javascript - 将单个单词对齐成行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47065281/
我有一个大的包含元素,里面有大约十个 DIV - 大多数平均宽度约为 300 像素,并且都设置为向左浮动。最终结果是一个小部件/网格类型的布局。但是,这种样式是专门为响应式设计而构建的 - 我们使用媒
我想通过 \n 拆分字符串并将包含特定标记的行放入数组中。 我有这个代码: char mydata[100] = "mary likes apples\njim likes playing\n
我是一名优秀的程序员,十分优秀!