【问题标题】:>Some< pictures not showing in IE6 [closed]>一些<图片没有在IE6中显示[关闭]
【发布时间】:2012-06-14 17:26:03
【问题描述】:

我正在开发一个需要跨多个浏览器运行的网站不幸的是,还包括 IE6。

我对按钮使用了滑动门技术,该技术在 Chrome、Safari 和 FF 中运行良好,但图像在 IE6 中完全不可见。更奇怪的是,它不是所有的图像,只是按钮背景。我放入实际按钮的图标渲染得很好。知道为什么吗?

HTML:
    <a id="re" href="#" class="button"><span><span class="resolved">Mark as Resolved</span></span></a>


CSS:
  a.button
  {
   background:transparent url(images/normal_end.png) no-repeat scroll top right;
   display:block;
   float:left;
   height: 32px;
   padding:3px;
   padding-right: 5px;
   margin:4px;
   text-decoration:none;
   color:#555;
   font-weight:normal;
   width:100px;
   font-size: 15px;
  }
  a.button span 
  {
   background: url(images/normal.png) no-repeat;
   display:block !important;
   line-height:22px;
   padding:0 5px 0 5px;
  }

【问题讨论】:

  • 这里没有问题。即使被问到,没有示例代码也无法回答。
  • 我想说问题是什么很清楚,但我希望现在对你来说已经足够明确了。
  • 不,不是很清楚。您找到的解决方案是一个众所周知的限制,但从您的问题来看,我什至无法猜到这可能是问题所在。你知道,实际上提到你正在尝试将透明 PNG 叠加在其他东西上可能会有很大帮助。
  • 你知道,我认为这项服务是关于经验丰富的程序员/用户帮助那些刚刚起步的人。不攻击他们。
  • 我投了反对票(您的问题,而不是您的答案),因为 any Google 搜索,例如“ie6 png”或“ie6 图像问题”或“ie6 背景不工作”你的问题的答案。你没有做基础研究。

标签: css image internet-explorer-6


【解决方案1】:

IE6对png图片有问题,但是可以把图片作为div的背景。

<body>  
<div class="imageyouneed"></div>  
</body>

<style>  
body {background-color:#000}  
div.imageyouneed {background:url(flower-transparent.png) no-repeat; height:100px;width:100px}  
</style>

<!--[if gte IE 5]>  
<style type="text/css">  
  div {  
  background:none;  
  filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='flower.png',sizingMethod='crop');  
  }  
</style>  
<![endif]--> 

请注意,高度和宽度是图像的高度和宽度。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-23
    • 2018-04-30
    • 2012-12-22
    • 2012-02-14
    • 2021-12-21
    相关资源
    最近更新 更多