我尝试使用CSS执行此操作divider。我尝试过这样的解决方案CSS technique for a horizontal line with words in the middle。但是当底部有图像时,它不是那么重要的。
这是我上次尝试后的CSS:
h5.trust-us {
color: #fff;
font-size: 15px;
letter-spacing: 1.9px;
opacity: 0.7;
bottom: 25px;
display: inline-block;
position: relative;
text-align:center;
}
h5.trust-us span:before,
h5.trust-us span:after {
content: "";
position: absolute;
height: 7px;
margin-top: 7px;
border-top: 1px solid #fff;
opacity: 0.7;
top: 0;
width: 100%;
}
h5.trust-us span:before {
right: 100%;
margin-right: 15px;
}
h5.trust-us span:after {
left: 100%;
margin-left: 15px;
}
我的HTML代码:
<div class="container text-center">
<h5 class="trust-us"><span>CONFÍAN EN NOSOTROS</span></h5>
<div class="container">
<div class="row">
<div class="col-md-2 col-sm-3 col-md-offset-1 text-center">
<img src="img/logo-scheneider.png"
srcset="img/logo-scheneider@2x.png 2x,
img/logo-scheneider@3x.png 3x"
/>
</div>
<div class="col-md-2 col-sm-3 text-center">
<img src="img/logo-scheneider.png"
srcset="img/logo-scheneider@2x.png 2x,
img/logo-scheneider@3x.png 3x"
/>
</div>
<div class="col-md-2 col-sm-3 text-center">
<img src="img/logo-scheneider.png"
srcset="img/logo-scheneider@2x.png 2x,
img/logo-scheneider@3x.png 3x"
/>
</div>
<div class="col-md-2 col-sm-3 text-center">
<img src="img/logo-scheneider.png"
srcset="img/logo-scheneider@2x.png 2x,
img/logo-scheneider@3x.png 3x"
/>
</div>
<div class="col-md-2 col-sm-2 text-center hidden-sm">
<img src="img/logo-scheneider.png"
srcset="img/logo-scheneider@2x.png 2x,
img/logo-scheneider@3x.png 3x"
/>
</div>
</div>
</div>
</div>
但是我无法将线条调整到宽度的100%。 This is the result.
我怎么能得到它?