我正在使用一些代码来倾斜页面背景的底部。页面部分如下(这只是关于skew函数的代码):
页面HTML代码(部分):
<div id="Fleet">
<div class="section Fleet_section">
<div class="container">
<div class="row">
<div class="col-lg-12">
<h1>FLEET</h1>
</div>
</div>
<div class="row top-buffer">
<div class="col-sm-6 col-md-4">
<div class="thumbnail Staffinview1 delay0_5s">
<img src="./images/xxx.jpg">
<div class="caption">
<h3>xxx</h3>
</div>
</div>
</div>
<div class="col-sm-6 col-md-4">
<div class="thumbnail Staffinview1 delay1s">
<img src="./images/yyy.jpg">
<div class="caption">
<h3>yyy</h3>
</div>
</div>
</div>
<div class="col-sm-6 col-md-4">
<div class="thumbnail Staffinview1 delay1_5s">
<img src="./images/zzz.jpg">
<div class="caption">
<h3>zzz</h3>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
和CSS:
.section{
width: 100%;
height: 100%;
padding-top: 80px;
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
background: #fff;
}
#Fleet {
font-size: 1.2em;
text-align: center;
background: #0C142b;
}
.thumbnail {
border: 1px solid #0C142b;
}
.thumbnail>img, .thumbnail a>img {
margin-right: auto;
margin-left: auto;
border-radius: 4px;
}
其余未在附加CSS中显示的元素使用引导(如row, container)。
现在我想在底部添加倾斜元素,类似于下面的效果:http://www.hongkiat.com/blog/skewed-edges-css/你能支持我如何实现它吗?
#Fleet::after
规则集缺少}
且没有display: block;
。它也缺少维度,例如width:100%;height:100%;