gpt4 book ai didi

html - 如何解决 Safari 中边框半径的问题?

转载 作者:行者123 更新时间:2023-11-27 22:54:23 24 4
gpt4 key购买 nike

边框应用于视频,但视频不在边框内。我怎样才能把它放在边界内?该问题仅存在于 Safari 中。我添加了一个链接以更清楚地显示它。

Safari then 2nd is Chrome

下面是 CSS。

   .video-div
{
justify-content: center;
}

video {
overflow: hidden;
height: 100%;
width: auto;
border: 6px white solid;
border-radius: 50px;
position: absolute;
right: 50%;
left: 50%;
transform: translateX(-50%);
}

谢谢!

最佳答案

我想你可以从这里得到解决方案:

Rounded cornes (border radius) Safari issue

html:
<div class="activity_rounded"><img src="http://placehold.it/100" /></div>

css:

.activity_rounded {
display: inline-block;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
-khtml-border-radius: 50%;
border: 3px solid #fff;
}

.activity_rounded img {
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
-khtml-border-radius: 50%;
vertical-align: middle;
}

关于html - 如何解决 Safari 中边框半径的问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59319792/

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