Overflow:hidden does not work in Safari [closed]

2019-02-26 04:44发布

问题:

I am stuck with a problem, I don't understand: my method to make YouTube images round is to put them in a container with

border-radius: 50%; 
overflow: hidden;

This works on Chrome and FF, but Safari places the image "over" the round container.

Please check the fiddle: http://jsfiddle.net/nikita_turing/2QyY3/

How do I make the images round on Safari?

回答1:

in Safari 5.1.7 (PC) the position:relative on the image seems to prevent the border-radius from being applied

remove position:relative and set margin-left (instead of left) in your jQuery then it works

jsfiddle demo



标签: css safari