gpt4 book ai didi

javascript - 我应该如何在 IE 6 中通过背景重复使用透明 png?

转载 作者:行者123 更新时间:2023-11-28 13:52:10 24 4
gpt4 key购买 nike

下面的代码有一个重复的背景图像“thinline.png”。最上面是 4 层透明 PNG:cardshadow.png、steel.png、startjobapplicationshadow.png 和 startapplication.png

我的目标是让这段代码在 IE6 中看起来不错,而不会弄乱其他浏览器。 IE 的此功能已被广泛记录,但我无法使其正常工作。请给我一些想法或例子来帮助我解决这个问题。

谢谢。迈克

代码:

  <div style="height: 333px; width: 100%; position: absolute; top: 68px; background-image:url(Resources/thinline.png); background-repeat:repeat-x; ">
<div style="position: absolute; height: 300px; width: 215px; top: 15px; right: 50%; margin-right: -390px; z-index: 2; ">
<img src="Resources/steel.png" style="position: absolute; top: 0px; z-index: 3;"/>
<img src="Resources/cardshadow.png" style="position: absolute; top: 0px; margin-top: -8px; margin-left: -10px; z-index: 2">
<img src="Resources/startjobapplication.png" style="margin-left: -65px; position: relative; top: 258px; left: 50%; z-index: 5; display: block;"/>
<img src="Resources/startjobapplicationshadow.png" style="margin-left: -67px; margin-top: -20px; position: relative; top: 258px; left: 50%; z-index: 4; display: block;"/>

最佳答案

看看IE7由院长爱德华兹。它是一个用于 Internet Explorer 6 的 javascript 库,可以使透明的 png 正常工作,还可以修复 css 错误并添加对其他 css 功能的支持。我过去使用过这个库并取得了一些成功(它比添加特定于 IE 的 css hack 更容易。)。但是,页面在加载时可能会短暂地看起来不正确。

关于javascript - 我应该如何在 IE 6 中通过背景重复使用透明 png?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1072410/

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