CSS Filmstrip
by Trevin Avery
HTML
<div class="filmstrip"></div>
CSS
.filmstrip {
width: 120%;
height: 150px;
background-color: rgba(0, 0, 0, 0.8);
position: relative;
margin: 40px -10%;
backface-visibility: hidden;
-ms-backface-visibility: hidden;
-moz-backface-visibility: hidden;
-webkit-backface-visibility: hidden;
transform: rotate(-2deg);
-ms-transform: rotate(-2deg);
-moz-transform: rotate(-2deg);
-webkit-transform: rotate(-2deg);
}
.filmstrip::before,
.filmstrip::after {
content: "";
display: block;
position: absolute;
height: 20px;
width: 100%;
background-color: rgba(0, 0, 0, 0);
background-image: linear-gradient(left,
rgba(0, 0, 0, 0.8) 50%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0) 100%);
background-image: -ms-linear-gradient(left,
rgba(0, 0, 0, 0.8) 50%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0) 100%);
background-image: -moz-linear-gradient(left,
rgba(0, 0, 0, 0.8) 50%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0) 100%);
background-image: -webkit-linear-gradient(left,
rgba(0, 0, 0, 0.8) 50%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0) 100%);
background-size: 40px 40px;
background-clip: padding-box;
border-color: rgba(0, 0, 0, 0.8);
border-width: 10px 0px;
border-style: solid;
}
.filmstrip::before {
top: -40px;
}
.filmstrip::after {
bottom: -40px;
}