gpt4 book ai didi

CSS Bootstrap 列在行外?

转载 作者:太空宇宙 更新时间:2023-11-04 08:01:59 25 4
gpt4 key购买 nike

      <div class="row">

<div class="col-md-4">
<div class="ticket_statistic_box">
<div class="row">
<div class="col-sm-5 iconarea">
<span class=" fa fa-briefcase ticket-icon"></span>
</div>
<div class="col-sm-6">
<div class="ticket_statistic_box_information">
<span>Total</span>
<span>0</span>
</div>
</div>
</div>
</div>
</div>

</div>

我将.iconarea的背景设置为白色,也就是该行票务统计框的左边部分,结果是:

img

看左边,再看右边,应该只填满了.ticket_statistic_box的背景部分,却跑到外面了?

.ticket_statistic_box {
height: 100px;
background-color: rgba(0, 0, 0, 0.3);
display: block;
margin-top: 10px;
text-align: center;
}

.ticket_statistic_box span.ticket-icon {
line-height: 110px;
}

.ticket_statistic_box_information span {
display: block;
padding: 0;
}

.ticket_statistic_box_information span:first-child {
font-weight: bold;
font-size: 20px;
text-align: center;
margin-top: 15px;
}

.ticket_statistic_box_information span:last-child {
font-weight: bold;
font-size: 30px;
text-align: center;
color: #eda248;
}

.ticket-icon {
color: #eda248;
font-weight: lighter;
font-size: 50pt;
}

.iconarea {
background-color: white;
}

我是不是犯了什么大错?

最佳答案

可能是其中之一,因为它的高度可能比它的父 div 高。

.ticket_statistic_box span.ticket-icon {
line-height: 110px;
}

.ticket-icon {
font-size: 50pt;
}

关于CSS Bootstrap 列在行外?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46941160/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com