我希望它们有圆 Angular ,以便在我的 CSS 中放置: .image { padding: 0; width: 100px; height: 100p-6ren">
gpt4 book ai didi

css - IE8 中的圆 Angular 图像

转载 作者:行者123 更新时间:2023-11-28 13:46:35 25 4
gpt4 key购买 nike

我有一些动态生成的图像:

<div class="image">
<?php echo "<img class='logo_client' src='img/clients/".$row['logo_name'].".jpg''>"; ?>
</div>

我希望它们有圆 Angular ,以便在我的 CSS 中放置:

.image {
padding: 0;
width: 100px;
height: 100px;
overflow: hidden;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
-o-border-radius: 10px;
border-radius: 10px;
behavior: url(css/PIE.php);
}

我可以在 Firefox、Chrome 和 IE9 中看到圆 Angular ,但它在 IE8 中不起作用。 PIE 已经与 IE8 中的其他元素一起工作。

有人知道它可能是什么吗?

非常感谢

最佳答案

我知道在 IE8 及以下版本中制作圆 Angular 的唯一方法是使用如下代码:

<div class="image">
<span class="tl"></span>
<span class="tr"></span>
<span class="br"></span>
<span class="bl"></span>
</div>

然后像这样使用 CSS:

.image { position: relative; }
.tl, .tr, .br, .bl { position: absolute; }
.tl { left: 0; top: 0; width: 20px; height: 20px; background: url(/images/tl.png) no-repeat top left; }
.tr { right: 0; top: 0; width: 20px; height: 20px; background: url(/images/tr.png) no-repeat top left; }
.br { right: 0; bottom: 0; width: 20px; height: 20px; background: url(/images/br.png) no-repeat top left; }
.bl { left: 0; bottom: 0; width: 20px; height: 20px; background: url(/images/bl.png) no-repeat top left; }

其中背景图像是与该 Angular 对应的所有圆 Angular 图像,例如右下角的背景图片可能如下所示:

http://www.webcredible.co.uk/i/br2.gif

等等(希望有意义)

可能有更好的方法来做到这一点,因为上面的方法有点费力,而且不是特别干净。

话虽如此,我怀疑在 IE8 及以下版本中使用圆 Angular 的任何方法都不会特别“干净”。我通常只让 IE8 和更低版本没有圆 Angular ,与其他浏览器相比,甚至没有多少人使用 7 和 8。

编辑:

如果我是你,我会避开像这样的代码“behavior: url(css/PIE.php);”其他浏览器不支持 IE 行为,我想连微软都放弃了。

关于css - IE8 中的圆 Angular 图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11816835/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com