gpt4 book ai didi

html - 如何为嵌入的YouTube视频添加边框半径?

转载 作者:行者123 更新时间:2023-12-03 05:27:54 26 4
gpt4 key购买 nike

到目前为止,这就是我所拥有的。无论我如何添加border-radius属性,它都无效。

<div class="videotar_video">
<iframe src="//www.youtube.com/embed/hqiNL4Hn04A" frameborder="0"></iframe>
</div>

.videotar_video
{
border: solid white;
border-top-width: 15px;
border-bottom-width: 15px;
border-left-width: 28px;
border-right-width: 28px;
position: relative;
padding-bottom: 56.25%; /* 16:9 */
padding-top: 5px;
height: 0;
}
.videotar_video iframe
{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

http://jsfiddle.net/FUBnc/

最佳答案

你可以做这样的事情

.videotar_video
{
border: 1px solid #000000;
border-top-width: 15px;
border-bottom-width: 15px;
border-left-width: 28px;
border-right-width: 28px;
position: relative;
padding-bottom: 56.25%; /* 16:9 */
padding-top: 5px;
height: 0;
marging: 10px;
border-radius: 10px;
background: #000000
}
.videotar_video iframe
{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

http://jsfiddle.net/4Vqp3/

关于html - 如何为嵌入的YouTube视频添加边框半径?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21779218/

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