html - 是否可以在 iframe 上使用 CSS 圆 Angular ?

标签 html css iframe

我环顾四周,据我所知这是不可能的,但是假设您要嵌入 YouTube iframe,是否可以使用 CSS 来绕过这些 Angular ?

最佳答案

How to Get Rounded Corners on an iFrame using Border-Radius CSS中描述的div容器方法对我有用。

And to do this you simply wrap the iFrame in div tags and give the div these css properties:

<div style="border-radius: 10px; width: 300px; overflow: hidden;">

The border-radius should be set to whatever you want the roundness to be, and the width must be set to the width of the iFrame, else you will get only a few (if any) rounded corners. But the most important thing is the overflow: hidden, as this hides the iFrames real corners.

关于html - 是否可以在 iframe 上使用 CSS 圆 Angular ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5738985/

相关文章:

具有顺序输出的 unix shell 脚本中的 HTML

javascript - 如何使主体在 ScrollDown 上向左滚动,反之亦然

html - 具有可变长度主要部分的页面的页脚

javascript - 元素漂浮在 Bootstrap 模式之外

CSS:文本输入边框的过渡效果

java - 如何在位于 iframe 中的富文本编辑器中使用 SendKeys(webdriver) 命令

javascript - 当iframe的源是javascript时浏览器做了什么

javascript - 将背景应用到 ionic 侧菜单

css - Reactjs:css 导致 reactjs 结果卡在一起

javascript - 如何从 iframe 在新选项卡上提交表单