Creating a folded corner map using css

I want to create the map shown in the image below. I have a fiddle where I created a sample map. In the code below, only a flat rectangular map is created

.card {
    height: 300px;
    background:none repeat scroll 0 0 #FFFFFF;
    box-shadow: 1px 1px 4px 4px threedshadow;   
    width:300px;
    height:200px;
  }

enter image description here

Please think about it?

+4
source share
1 answer
.card {
  position: relative;
  width: 30%;
  height: 300px;
  padding: 1em 1.5em;
  margin: 2em auto;
  color: #fff;
  background: #97C02F;
}
.card:before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  border-width: 0 16px 16px 0;
  border-style: solid;
  border-color: #658E15 #fff;
}

Demo

You can play with the above and try using .card:afterfor the lower left and right corners.

+6
source

Source: https://habr.com/ru/post/1539382/


All Articles