Is it possible to create edge or fold with CSS?


Is it possible to create a fold like this with CSS? What is it called and how is it created? I've seen it on websites before, but I do not know what it is called or how it is done and I've tried searching for it.

Thank you.

enter image description here

Problem courtesy of: user1272372


Use pseudo elements and borders:

ul {
  width: 500px;
  height: 300px;
  background: lightblue;
  margin: 50px auto;
  position: relative;
  padding: 50px 0;

li {
  display: block;
  width: 300px;
  height: 100px;
  background: salmon;
  position: relative;
  left: -20px;

li:before {
  content: "";
  position: absolute;
  top: -20px;
  line-height: 0;
  left: 0;
  width: 0;
  height: 0;
  border-bottom: 20px solid red;
  border-left: 20px solid transparent;


Solution courtesy of: bookcasey


There is currently no discussion for this recipe.

This recipe can be found in it's original form on Stack Over Flow.