SCSS - Shape with CSS only

0 votes
307 views
added Jul 20, 2018 in SCSS by LC Marshal Captain (25,790 points)
edited Jul 20, 2018 by LC Marshal
.shape {
// cone shape
  &-cone {
    width: 0;
    height: 0;
    border-left: 70px solid transparent;
    border-right: 70px solid transparent;
    border-top: 100px solid $shape-blue;
    -moz-border-radius: 50%;
    -webkit-border-radius: 50%;
    border-radius: 50%;
  }
}

 

1 Response

0 votes
responded Jul 20, 2018 by LC Marshal Captain (25,790 points)
// badge shape
&-badge {
background: $color-green;
display: inline-block;
height: 55px;
margin-left: 20px;
margin-top: 55px;
  position: relative;
  width: 100px;
  &:before {
    border-bottom: 35px solid $color-green;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    content: "";
    height: 0;
    left: 0;
    position: absolute;
    top: -35px;
    width: 0;
  }
}

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...