4

I'm trying to figure out how to make a wavy border like this image:

enter image description here

div {
  position:relative;
  height:100px;
  width:100px;
  background:transparent;
  overflow:hidden;
}

div:before {
  content:"";
  position:absolute;
  top:calc(-100% - 25px);
  left:00%;
  height:200%;
  width:200%;
  border-radius:50%;
  background:cornflowerblue;
  border-bottom:50px solid blue;
}
div:nth-child(2) {
  transform:rotate(180deg);
  margin-left:40px;
  margin-top:-25px;
}
<div></div>
<div></div>

I've got this example above, however I want a better way of doing it. This example is very very messy way of doing it.

I have thought of doing it with an image but then I can't change the colour with CSS every time I want to change the colour scheme.

Anyone got any ideas?

I do not want to use oval shapes to make the waves, as it's not neat.

YaBCK
  • 2,949
  • 4
  • 32
  • 61

0 Answers0