1

Is it possible to set CSS like this in any image?

I need to create an image with this half circle effect in the image. Is it possible to do with CSS?

Rick Sibley
  • 605
  • 7
  • 18

2 Answers2

3

Because GRADIENTS FTW

div{
  display: inline-block;
  color: white;
  padding: 40px 50px 20px;
  background: radial-gradient(circle at top, white 14px, #0091C9 15px);
  border-radius: 10px 10px 0 0;
}
<div>WOOHOO</div>
GuCier
  • 6,919
  • 1
  • 29
  • 36
2

use border-radius (change the size values and colors according to your needs)

#cont {
  width: 250px;
  height: 150px;
  background: navy;
  position: relative;
  border-radius: 20px 20px 0 0;
  -webkit-border-radius: 20px 20px 0 0;
  text-align: center;
}

.text {
  color: white;
  font-weight: 900;
  position: absolute;
  top: 60px;
  right:0;
  left:0;
  text-align: center;
}

.circle {
  background: white;
  position: absolute;
  top: -15px;
  left: 110px;
  width: 30px;
  height: 30px;
  -webkit-border-radius: 20px;
  border-radius: 20px;
}
<div id="cont">
<div class="circle"></div>
<div class="text"> Text</div>
</div>
benams
  • 4,308
  • 9
  • 32
  • 74