3 回答
TA贡献1869条经验 获得超4个赞
margin:0;给班级一些p。
.carFilter {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
background: teal;
padding: 10px;
}
.boxyc {
border-top: 10px solid white;
border-bottom: 10px solid white;
border-left: 10px solid white;
border-right: 10px solid white;
border-radius: 5px;
background-color: #CCCCCC;
color: red;
font-size: 1em;
margin: 10px;
}
.vcxvcx {
margin: 0;
}
<div class="carFilter">
<p class="boxycx">Bla Bla:</p>
<span id="boxyc" class="boxyc"><p class="vcxvcx">bla</p></span>
<span id="boxyc" class="boxyc"> <p class="vcxvcx">bla</p></span>
<span id="boxyc" class="boxyc"><p class="vcxvcx">bla</p></span>
<span id="boxyc" class="boxyc"> <p class="vcxvcx">bla</p></span>
<span id="boxyc" class="boxyc"><p class="vcxvcx">bla</p></span>
</div>
TA贡献1895条经验 获得超3个赞
填充(和弹性盒)设置高度。我将 boxyc 的内边距更改为 5px 20px。调整以满足您的需求。
.carFilter{
display:flex;
flex-direction:row;
align-items: center;
justify-content: center;
}
p {
margin: 0;
}
.boxyc{
padding:5px 20px;
border-top:1px solid white;
border-bottom:1px solid white;
border-left:1px solid white;
border-right:1px solid white;
border-radius:5px;
background-color:#CCCCCC;
color:#999999;
display: inline-block;
font-size:150%;
margin:0;
}
.boxycx{
padding:20px;
align-items: center;
justify-content: center;
height:20%;
}
<div class="carFilter">
<p class="boxycx">Bla Bla:</p>
<span id="boxyc" class="boxyc"><p class="vcxvcx">bla</p></span>
<span id="boxyc" class="boxyc"> <p class="vcxvcx">bla</p></span>
<span id="boxyc" class="boxyc"><p class="vcxvcx">bla</p></span>
<span id="boxyc" class="boxyc"> <p class="vcxvcx">bla</p></span>
<span id="boxyc" class="boxyc"><p class="vcxvcx">bla</p></span>
</div>
- 3 回答
- 0 关注
- 134 浏览
添加回答
举报