I am trying to skew a background image on one side that has a border.
The layout I am basically trying to create is as follows:
Here is a quick JSFiddle I made with the current setup:
https://jsfiddle.net/silvawebdesigns/b2ae0k69/11/
#about-gallery {
margin: 60px 0;
display: -ms-flex;
display: -webkit-flex;
display: flex;
flex-wrap: wrap;
margin-bottom: 500px;
width: 100%;
}
.about-img-wrapper {
position: relative;
width: 100%;
display: -ms-flex;
display: -webkit-flex;
display: flex;
flex-wrap: wrap;
margin: 5px;
}
#about-gallery .about-bg {
border: solid 10px black;
float: left;
width: 100%;
height: 300px;
background-size: cover;
background-position: center;
}
#about-gallery .image-1 {
width: -moz-calc(55% - 10px);
width: -webkit-calc(55% - 10px);
width: calc(55% - 10px);
}
#about-gallery .image-2 {
width: -moz-calc(45% - 10px);
width: -webkit-calc(45% - 10px);
width: calc(45% - 10px);
}
#about-gallery .image-4,
#about-gallery .image-5 {
width: -moz-calc(50% - 10px);
width: -webkit-calc(50% - 10px);
width: calc(50% - 10px);
}
<div id="about-gallery">
<div class="about-img-wrapper img-about image-1">
<div class="about-bg" style="background-image: url(https://via.placeholder.com/1140x400.png?text=SKEW+THIS+IMAGE+ON+ONE+SIDE);"></div>
</div>
<div class="about-img-wrapper img-about image-2">
<div class="about-bg" style="background-image: url(https://via.placeholder.com/1140x400.png?text=SKEW+THIS+IMAGE+ON+ONE+SIDE);"></div>
</div>
<div class="about-img-wrapper img-about image-3">
<div class="about-bg" style="background-image: url(https://via.placeholder.com/1140x400.png?text=SKEW+THIS+IMAGE+ON+ONE+SIDE);"></div>
</div>
<div class="about-img-wrapper img-about image-4">
<div class="about-bg" style="background-image: url(https://via.placeholder.com/1140x400.png?text=SKEW+THIS+IMAGE+ON+ONE+SIDE);"></div>
</div>
<div class="about-img-wrapper img-about image-5">
<div class="about-bg" style="background-image: url(https://via.placeholder.com/1140x400.png?text=SKEW+THIS+IMAGE+ON+ONE+SIDE);"></div>
</div>
</div>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…