0

How i can make inverse oval in css as on image (layer)?

I want footer on webpage. Starting position on: bottom: 0px; right: 0px;

enter image description here

This is my test but is bad.

.inverseoval{
background-color: #ff3300;
     display: inline-block;
     margin-left: 20px;
     height:30px;
     width:400px;
     border: 3px solid #000000;
     border-width: 0 1px 1px 1px;
     border-radius: 50% / 100%;
     border-top-left-radius: 0;
     border-top-right-radius: 0;
}
<div class="inverseoval"></div>
Temani Afif
  • 245,468
  • 26
  • 309
  • 415

1 Answers1

0

You can try something with pseudo-elements like :before . Other solution would be with SVG but i made an answer just with a :before element.

Add it to the inverseoval div and shape it and position it how you want.

Be careful to give it the same background-color as for the content.

.content {
  height: 200px;
  background: black;
  padding-bottom: 50px;
}

.inverseoval {
  height: 100px;
  background: red;
  position: relative;
  overflow: hidden;
}

.inverseoval:before {
  position: absolute;
  top: -20px;
  left: 0;
  content: "";
  height: 80px;
  width: 100%;
  transform: rotate(-2deg);
  background-color: black;
  border-bottom-left-radius: 100%;
  border-bottom-right-radius: 100%;
}
<div class="content">

</div>
<div class="inverseoval"></div>
Mihai T
  • 17,254
  • 2
  • 23
  • 32