溢出:隐藏在Safari中不工作 [英] Overflow:hidden does not work in Safari

查看:133
本文介绍了溢出:隐藏在Safari中不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一个问题,我不明白:我使用YouTube图片的方法是将它们放在一个容器中

  border-radius:50%; 
overflow:hidden;

这适用于Chrome和FF,但Safari将图像放置在圆形容器之上。 p>

请检查小提琴: http://jsfiddle.net/ nikita_turing / 2QyY3 /



如何在Safari上显示图片?

解决方案

在Safari 5.1.7(PC)中,图像上的 position:relative 似乎阻止了 border-radius 从应用



删除位置:相对并设置 -left (而不是 left )在你的jQuery中,然后它工作



jsfiddle demo


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?

解决方案

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

这篇关于溢出:隐藏在Safari中不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆