Alyssa Reyes
Alyssa Reyes

Reputation: 2439

CSS3 Shapes or SVG?

Is this possible to make using CSS3? or should I use svg?

enter image description here

Upvotes: 0

Views: 40

Answers (1)

Temani Afif
Temani Afif

Reputation: 273086

You can do it like this with CSS:

body {
  margin: 0;
}

.box {
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.box:before {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  left: 43px;
  background: #2f99ce;
  border-radius: 100px/190px 0 0 0;
  transform: skewX(-20deg);
  transform-origin: left bottom;
}

.box:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 51px;
  height: 36px;
  background: radial-gradient(circle at top left, transparent 69%, #2f99ce 70%);
  transform: skewX(-20deg);
  transform-origin: left bottom;
}
<div class="box">
</div>

Upvotes: 1

Related Questions