【发布时间】:2018-11-21 23:11:45
【问题描述】:
我需要将三个 div 分开,保持在同一行,但彼此的背景颜色不允许这样做。问题是,当我设置额外的边距或填充时,div 会包裹起来,而不是保持水平对齐。
#service_container {
text-align: center;
}
.servicon {
font-size: 54px;
}
.service_page_tile {
background-color: rgba(161, 204, 239, 0.5);
}
<div id="service_container" class="container-fluid">
<div id="s_idea" class="container-fluid">
<h2>Idea</h2>
<div class="row">
<div class="service_page_tile col-lg-4 col-md-6 col-sm-12">
<i class="servicon far fa-lightbulb"></i><br> Do you have an idea about a website you want to realize? Blog, Company Website, e-shop, V-log channel, web-app or just your personal page, I will pay special attention to the customer's output to achieve.
</div>
<div class="service_page_tile col-lg-4 col-md-6 col-sm-12">
<i class="servicon fas fa-lightbulb"></i><br> Do you still need to find out what's your deal? Let's check templates and discover what's the best formula chosen by the most succesfull people or business.
</div>
<div class="service_page_tile col-lg-4 col-md-12 col-sm-12">
<i class="servicon fas fa-video"></i><br> What about a video? A resumé, a clip for a presentation or simply your last travel on the other side of the world. there's nothing more catchy to convey emotions or ideas!
</div>
</div>
</div>
【问题讨论】:
-
* {box-sizing:border-box;} -
您忘记链接 Bootstrap 了吗?
-
@Chiller 如果他正在使用应该包含的引导程序
-
nope bootstrap 不存在
-
是的,我正在使用 Bootstrap4。它仍然不起作用,都添加了填充或边距。我应该只将它应用于中间的瓷砖吗?
标签: html css twitter-bootstrap bootstrap-4 frontend