【发布时间】:2016-05-16 23:04:45
【问题描述】:
我已经包含了这个:
<style>
html, body {
padding: 0;
margin: 0;
font-family: Segoe UI;
}
</style>
下面是我所指的 div 的代码,包括其内容:
<div class="learn-more">
<div class="container">
<div class="row">
<h1 style="color: #292f33;">SERVICES</h1>
<div class="col-md-4">
<h4>Delivery</h4><hr style="max-width: 70px;">
<p style="text-align: center; font-size: 19px; font-family: Segoe UI;">At Gadget Market we offer free delivery for purchases prized over $300. Our delivery service is up to your doorstep or wherever you would like within the country.</p>
</div>
<div class="col-md-4">
<h4>Warranty</h4><hr style="max-width: 70px;">
<p style="text-align: center; font-size: 19px; font-family: Segoe UI;">Devices from Gadget Market come with not less than a 12-month warranty. Gadget issues within this period will be catered for and a replacement provided if need be.</p>
</div>
<div class="col-md-4">
<h4>Money back Guarantee</h4><hr style="max-width: 70px;">
<p style="text-align: center; font-size: 19px; font-family: Segoe UI;">If you are not satisfied with the product you bought from Gadget market, then you can return the gadget to us within 30 days for a 90% money back guarantee.</p>
</div>
</div>
</div>
</div>
这是 CSS:
.learn-more {
background-size: cover;
width: inherit;
margin: 0;
padding: 0;
background-color: rgba(85,172,238,0.8);
}
.learn-more .col-md-4 h4 {
font-family: Cambria;
font-size: 26px;
text-align: center;
color: #292f33;
}
.learn-more .col-md-4 p {
font-family: Segoe UI;
font-size: 19px;
text-align: center;
color: #292f33;
}
但是 div .learn-more 仍然没有跨越整个宽度。而且我觉得这很奇怪,因为我在另一个项目中使用了完全相同的代码并且它有效!
下面的链接是图片:
【问题讨论】:
-
您明确指的是哪个
div? -
您好-您能帮我们哪个 div 是“div”吗?上面的标记中有大约 6 个 div。此外,您能否建议其他样式,尤其是
div.learn-more和div.container? -
我指的是 .learn-more div
标签: html css twitter-bootstrap