Skip to content Skip to sidebar Skip to footer

Css Shape Creation Curved Wave

This is what i have got so far After after checking out tutorial I want know how curved effect is generated on divs the only question that i found near to what i was looking for

Solution 1:

Here is a final demo (archived) on the folded corners:

and the following code is how you can create them:

.note {
  position: relative;
  width: 30%;
  padding: 1em1.5em;
  margin: 2em auto;
  color: #fff;
  background: #97C02F;
  overflow: hidden;
}

.note:before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  border-width: 016px16px0;
  border-style: solid;
  border-color: #fff#fff#658E15#658E15;
  background: #658E15;
  -webkit-box-shadow: 01px1pxrgba(0, 0, 0, 0.3), -1px1px1pxrgba(0, 0, 0, 0.2);
  -moz-box-shadow: 01px1pxrgba(0, 0, 0, 0.3), -1px1px1pxrgba(0, 0, 0, 0.2);
  box-shadow: 01px1pxrgba(0, 0, 0, 0.3), -1px1px1pxrgba(0, 0, 0, 0.2);
  /* Firefox 3.0 damage limitation */display: block;
  width: 0;
}

.note.rounded {
  -moz-border-radius: 5px05px5px;
  border-radius: 5px05px5px;
}

.note.rounded:before {
  border-width: 8px;
  border-color: #fff#fff transparent transparent;
  -moz-border-radius: 0005px;
  border-radius: 0005px;
}
<divclass="note"></div>

To create a curved wave effect you can use this code:

#wave {
  position: relative;
  height: 70px;
  width: 600px;
  background: #e0efe3;
}

#wave:before {
  content: "";
  display: block;
  position: absolute;
  border-radius: 100%50%;
  width: 340px;
  height: 80px;
  background-color: white;
  right: -5px;
  top: 40px;
}

#wave:after {
  content: "";
  display: block;
  position: absolute;
  border-radius: 100%50%;
  width: 300px;
  height: 70px;
  background-color: #e0efe3;
  left: 0;
  top: 27px;
}
<divid="wave"></div>

To achieve the curve you’ll need to inverse where it starts. Follow the same demo, just reverse your values.

See a live demonstration (archived) of how border radius can create the shapes and effects you want and adjust each corner to see it in action.

Post a Comment for "Css Shape Creation Curved Wave"