jjzjj

javascript - 溢出 :hidden for rounded borders using css3pie in IE8?

coder 2024-12-23 原文

我有这个 HTML:

<div id="micrositePhotoDiv">
    <img id="micrositePhoto" />
</div>

和CSS:

#micrositePhotoDiv {
    overflow:hidden;
    @include border-radius(10px);
    behavior: url(PIE.htc);
}

img 的 src 在 javascript 中以编程方式设置。

img 设置为其包含的 div 的宽度。在ie9、firefox、chrome等中,这使得图片有圆 Angular 边框(因为图片的 Angular 在边框外,存在overflow:hidden;)

在 IE8 中,图像没有圆 Angular 边框。 border-radius 属性生效(如果我执行 border: solid black 1px;,我可以在图像后面看到它)但图像的边界外部分不会被隐藏。

有没有办法使用 css、css3pie、javascript 等解决这个问题?或者这在 IE8 中是不可能实现的?

最佳答案

border-radius 应用于 - divimg,它应该可以工作。

关于javascript - 溢出 :hidden for rounded borders using css3pie in IE8?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7765434/

有关javascript - 溢出 :hidden for rounded borders using css3pie in IE8?的更多相关文章

随机推荐