gpt4 book ai didi

image - 边界半径 Safari

转载 作者:行者123 更新时间:2023-11-28 12:57:33 25 4
gpt4 key购买 nike

我正在制作一个横幅,人们可以在上面上传图片。

在上传之前,您会看到图片。只需一个标准的 html 代码

<div id="box"><img src="blah blah" /></div>

CSS:

div {
width:370px;
height:204px;
position:relative;
overflow:hidden;
border-top-left-radius: 7px;
border-top-right-radius: 7px;
}

图像将适合 div id="box"成功。如果您看到我使用了 border-top-left-radius 和 right-radius:这在 firefox 和 Chrome 中非常有效。但在 Safari 中它不起作用。

示例:
这是 ChromeFirefox。您可以看到图像适合屏幕,顶部有一个漂亮的 border-radius。
enter image description here

这是Safari。您会看到图像顶部没有边框半径。我不知道问题所在。
enter image description here

为此我也尝试使用:

-webkit-

但这也没有用。有人知道如何为 safari 解决这个问题吗?

最佳答案

请更新下面的 css 并检查.....并根据您的要求进行必要的更改..

希望这能解决你的问题

div {
width:370px;
height:204px;
position:relative;
overflow:hidden;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
-khtml-border-radius: 5px;
border-radius: 5px;
border: 1px solid #D9D9D9;
}

如果您的问题已解决,请标记答案...

关于image - 边界半径 Safari,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16436309/

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