-1
You can achieve this by using the css property instead transform
.
div.skew {
background-color: #2d2d2d;
height: 100px;
width: 150%;
margin-bottom: 10px;
transform: rotate(358deg) scale(1) skew(0deg) translate(0px);
-webkit-transform: rotate(358deg) scale(1) skew(0deg) translate(0px);
-moz-transform: rotate(358deg) scale(1) skew(0deg) translate(0px);
-o-transform: rotate(358deg) scale(1) skew(0deg) translate(0px);
-ms-transform: rotate(358deg) scale(1) skew(0deg) translate(0px);
}
.container {
background-color: #7d7d7d;
overflow: hidden;
width: 100%;
}
<div class="container">
<div class="skew"> </div>
<div class="skew"> </div>
</div>
Everything is a design move, you can add a div with skew
to a container with overflow: hidden;
.
It’s enough to work with CSS to get what you want.
PUT THE CODE.
– Diego Souza
What you’ve been trying to do?
– BrTkCa
was just testing.slide:after{ border:2px Solid red; } . slide { Transform: skew(20deg); width: 100%; height: 700px; background: blue; }
– André
Possible duplicate of Creation of diagonal div
– Guilherme Nascimento