There are several ways to do this.
You can use a div
with the bottom in gradient. (Recommend)
Background: linear-gradient (Ângulo, cor comprimento, cor comprimento, cor comprimento)
Below is an example.
* {margin:0;padding:0}
html, body {
height: 100%;
width: 100%;
}
body {
background-image: linear-gradient(
160deg,
blue 65%,
black 65%);
}
If you have difficulties creating a gradient, just use the site https://www.cssmatic.com/gradient-generator
You can also use two div
. Just use transformt: rotate(Ângulo)
and some values to change the length. (I do not recommend)
html,body, #container, .azul, .preto {
width:100%;
height: 100%
}
#container {
overflow:hidden;
}
.azul {
background: blue
}
.preto {
background: black;
transform: rotate(165deg);
margin-top: -157px;
margin-left: 20px;
width: 150%;
}
<div id="container">
<div class="azul"></div>
<div class="preto"></div>
</div>
Or you can use images.
background-image: url('Link da imagem');
background-size: cover; /* Informa para a imagem cobrir todo o elemento */
background-repeat: no-repeat /* Informa para não repetir a imagem. */
Example:
body {
background-image: url('https://i.stack.imgur.com/OoXOC.png');
background-size:cover;
background-repeat: no-repeat
}
very obg friend, I’ll test here and see how it looks, obg even!!
– cleiton
Just complementing the answer, to make it clear there on the site, was used a background image already ready. That’s why nothing related was found. Congratulations on the explanation.
– John-Jones
Friend, could you tell me the name of this style?? so I can do some research on it? Please
– cleiton
@John-Jonesentendi, very obggg
– cleiton
The first example, it worked right!! obg
– cleiton