首页 > 解决方案 > 如何解决 Safari 中的边框半径问题?

问题描述

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

Safari 然后第二个是 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%);
 }

谢谢!

标签: htmlcsssafari

解决方案


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

圆角(边界半径)Safari问题

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;
}

推荐阅读