<section class="models">
<h1>Diagonial non clip-path hover</h1>
<div class="modelCont">
<div class="d-flex flexcont">
<div class="flex-item">
<div class="flex-item-inner d-flex align-items-end justify-content-center" style="background-image:url('https://douvogiannis.com/cars/pic1.png')">
<div class="modelInnerText">
<div class="d-flex align-items-center justify-content-start">
</div>
</div>
</div>
</div>
<div class="flex-item">
<div class="flex-item-inner d-flex align-items-end justify-content-center" style="background-image:url('https://douvogiannis.com/cars/pic2.png')">
<div class="modelInnerText">
<div class="d-flex align-items-center justify-content-start">
</div>
</div>
</div>
</div>
<div class="flex-item">
<div class="flex-item-inner d-flex align-items-end justify-content-center" style="background-image:url('https://douvogiannis.com/cars/pic3.png')">
<div class="modelInnerText">
<div class="d-flex align-items-center justify-content-start">
</div>
</div>
</div>
</div>
<div class="flex-item">
<div class="flex-item-inner d-flex align-items-end justify-content-center" style="background-image:url('https://douvogiannis.com/cars/pic4.png')">
<div class="modelInnerText">
<div class="d-flex align-items-center justify-content-start">
</div>
</div>
</div>
</div>
<div class="flex-item">
<div class="flex-item-inner d-flex align-items-end justify-content-center" style="background-image:url('https://douvogiannis.com/cars/pic5.png')">
<div class="modelInnerText">
<div class="d-flex align-items-center justify-content-start">
</div>
</div>
</div>
</div>
<div class="flex-item">
<div class="flex-item-inner d-flex align-items-end justify-content-center" style="background-image:url('https://douvogiannis.com/cars/pic6.png')">
<div class="modelInnerText">
<div class="d-flex align-items-center justify-content-start">
</div>
</div>
</div>
</div>
</div>
</div>
</section>
/* FLEX GROW */
body {
overflow-x: hidden;
}
.d-flex {
display: flex;
&.align-items-end {
align-items: flex-end;
}
&.justify-content-center {
justify-content: center;
}
&.justify-content-start {
justify-content: flex-start;
}
}
.models {
display: flex;
width: 100%;
flex-direction: column;
align-items: center;
position: relative;
h1 {
position: absolute;
top: 100px;
z-index: 999;
font-size: 30px;
text-transform: uppercase;
font-family: "Arial", helvetica;
}
.modelCont {
background-image: linear-gradient(
to right,
#ffffff 0%,
#ffffff 60%,
#e9e9e9 100%
);
position: relative;
display: flex;
justify-content: space-around;
width: 106%;
.flexcont {
padding: 0;
margin: 0;
list-style: none;
width: 103%;
display: flex;
justify-content: space-between;
align-items: stretch;
transform: skewX(-20deg);
overflow: hidden;
background-image: linear-gradient(
to right,
#ffffff 0%,
#ffffff 60%,
#e9e9e9 100%
);
position: relative;
.flex-item {
text-align: center;
flex-grow: 1;
transition: all ease-in-out 300ms;
width: 200px;
height: 800px;
background-image: linear-gradient(
to right,
#ffffff 0%,
#ffffff 60%,
#e9e9e9 100%
);
overflow: hidden;
&:hover {
flex-grow: 2;
width: 50%;
transition: all ease-in-out 300ms;
.flex-item-inner {
.modelInnerText {
opacity: 1;
transition: all ease-in-out 300ms;
}
}
}
.flex-item-inner {
background-size: 500px;
background-repeat: no-repeat;
background-position: center center;
height: 100%;
transform: skewX(20deg) scaleX(-1);
overflow: hidden;
width: 600px;
margin: 0 auto;
.modelInnerText {
transform: scaleX(-1);
margin: 0 0 150px;
width: 100%;
opacity: 0;
transition: all ease-in-out 300ms;
a {
margin: 0 30px 0 0;
}
}
}
}
}
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.