Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS Background Triangle 3 colors

I want to create a CSS background for a HTML5 section and it should look like this:

css triangle:

css triangle

I have already researched and tried stuff like transform skew or border manipulation. But i can t really achieve the view like i want to. Is any CSS pro here ? Would be nice. ps - if a bootstrap solution exists would also help me.

Greets

Tobias

like image 494
Tobias Avatar asked Aug 28 '16 12:08

Tobias


1 Answers

Use a linear-gradient

* {
  margin: 0;
  psdding: 0;
  }
div {
  height: 100vh;
  width: 100vw;
  background-color: blue;
  background-image: linear-gradient(10deg, lightblue 50%, transparent 50%), linear-gradient(-60deg, brown 30%, transparent 30%);
  }
<div>
  </div>
like image 197
Andrey Fedorov Avatar answered Sep 28 '22 18:09

Andrey Fedorov