Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
570 views
in Technique[技术] by (71.8m points)

html - How to curve the div from bottom with image background

enter image description hereimage Is it possible to add the bottom curved using HTML CSS so we don't ned to crop the image like this? The main purpose of this is to allow image curved automatically like that, I tried to add border-radius but it won't work. Any help?

I think we need to use the SVG? I am not sure.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Depending on your browser support requirements you could use clip-path and circle.

.clip {
  display: inline-block;
  clip-path: circle(100% at 50% -50%);
}
<div class="clip">
  <img src="https://placehold.it/500x350" alt="">
</div>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...