img控制图片显示大小
2024年1月25日小于 1 分钟约 173 字
A:添加width和height就行
新需求:如何用flex,根据同的个数,渲染不同的大小
解决方案:
<div id = "options">
<span v-for="n in 2"
:key="n"
v-text="String.fromCharCode(64 + n)">
<!-- more -->
</span>
</div>...
width: 570px;
height: 850px;
padding: 20px;
position: fixed;
bottom: 20px;
right: 20px;
font-size: 28px;
color: rgb(178, 178, 178);
background: rgb(15, 15, 19);
/*display: none;*/
#headContainer {
#title {
margin-bottom: 6px;
}
#options { //核心代码
display: flex;
flex-wrap: nowrap;
flex-direction: row;
justify-content: space-around;
align-items: flex-start;
>span {
width: 48%;
text-align: center;
margin-right: 10px;
background: rgb(55, 55, 55);
}
/*margin-right: 10px;*/
}
...