I've looked around, and as far as I can see it's not possible, but say you're embedding a YouTube iframe, is it possible to round those corners using CSS?
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
- Adding a timeout to a render function in ReactJS
Try adding this to your CSS:
Wrapping the
<iframe>
in a<div>
should work.I have attached a jsfiddle to demonstrate: http://jsfiddle.net/fxPsC/
Maybe if you use it correctly with a "cover" image. Some modern themes offer this.
Not the best solution though. What is your aim ?
You can also add it to the iframe tag if your tag has inline style:
The way to go is wrapping the iframe in a circular div as other users suggested. The only difference being that you have to add an additional style
position:relative
to the wrapper for it to work in Chrome browser.So the code would go like this:
The div container method described in How to Get Rounded Corners on an iFrame using Border-Radius CSS works for me.