gpt4 book ai didi

html - CSS中的 flex 背景图像

转载 作者:太空宇宙 更新时间:2023-11-04 09:28:21 25 4
gpt4 key购买 nike

我正在尝试实现类似下图(来自 state street 的曲线背景图像)的效果网站,但在 CSS 中。

感谢 stackoverflow 上其他用户的帖子,我已经能够使用 border-radius 创建一些类似的东西,请参阅 http://jsfiddle.net/dg44thbr/9/

问题是我的曲线……太 flex 了。我希望它像 State Street 那样更“笔直”。

在 CSS 中可以吗?

谢谢,

enter image description here

body {
margin: 0;
background: red;
}

div#back {
position: relative;
height: 200px;
background-image: url(http://wearepeak.co.uk/wp-content/uploads/2016/02/testimonial.jpg);
width: 100%;
border-bottom-left-radius: 70% 60px;
border-bottom-right-radius: 30% 10px;
}

最佳答案

那么,您可以试穿这件尺码:http://jsfiddle.net/dg44thbr/10/

body {
margin: 0;
background: red;
}

div#back {
position: relative;
height: 100px;
background-image: url(http://wearepeak.co.uk/wp-content/uploads/2016/02/testimonial.jpg);
width: 100%;
border-bottom-left-radius: 250% 160px;
border-bottom-right-radius: 0;
margin-left: -2em;
padding-right: 2em;
}
<div id="back"></div>

关于html - CSS中的 flex 背景图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40952360/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com