使用 Firefox 或 Chrome 并右键单击->检查元素。这是查看网站背后发生的事情的最快方式。
他们正在使用图像作为封面。
HTML:
<div class="coverImg" style="background-image: url(urltoimage); height: 456px; ">
</div>
CSS:
.coverImg {
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
position: relative;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
background-attachment: fixed;
}