-4

I'm trying to make a wavy effect on the border of where one section meets another on a page (see pic below). What's the best approach to take here? The waves should be roughly equal in size.

html section wave effect

EDIT: to the person who flagged this as 'already answered', the effect in your linked question looks nothing like this one. That effect cannot be used to make the low wide sloping waves in my image.

1
  • @tacoshy that's a link to a different question that with an answer with no explanation that is specific to that question. Not helpful at all, just as the answer further down is not helpful - which you agreed with. Commented Jun 15, 2022 at 18:43

1 Answer 1

0

Please try this

body {
  background: #333;
}

.wrapper {
  width: 500px;
  height: 500px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 5px;
  background-image: linear-gradient(to top, #accbee 0%, #e7f0fd 100%);
  overflow: hidden;
}

.wave {
  width: 1000px;
  height: 1025px;
  position: absolute;
  top: -25%;
  left: 50%;
  margin-left: -500px;
  margin-top: -500px;
  border-radius: 35%;
  background: rgba(255, 255, 255, .75);
  animation: wave 15s infinite linear;
}

@keyframes wave {
  from {
    transform: rotate(0deg);
  }
  from {
    transform: rotate(360deg);
  }
}
<div class="wrapper">
  <div class="wave"></div>
</div>

Sign up to request clarification or add additional context in comments.

5 Comments

That creates a moving wave effect. It doesn't need to be animated.
I love this clever use of a radius with rotation animation. +1 even if it's not what the OP asked for... OP can learn from this... @dedles play with the CSS, that's why I made it runnable. But yes, it really should have some explanation.
Code only answers are considered low quality. Without sufficient explaination, your answer is hard to understand. If the OP can't understand your answer, then he also won't be able to reproduce your possible solution. As such it would be worthless to him/her. Please add a sufficient explaination of your possible solution.
@JuanMendes how can the OP elarn from ti without explaination of how this is achieved? also why should the OP learn from it when this it not what he asked for in the first place?
@tacoshy They load up the example, edit it and learn, just like I just did, I had never seen this technique. Of course an explanation is much better, but if one really wants to learn, it's here for anyone. The OP didn't even show an attempt which didn't help their cause 😅

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.