English 中文(简体)
Safari 和 IE 的文本阴影 [重复]
原标题:text-shadow for Safari and IE [duplicate]
  • 时间:2012-05-22 23:50:52
  •  标签:
  • html
  • css
This question already has an answer here:
Closed 11 years ago.

Possible Duplicate:
Equivalent to text-shadow in IE

我有这个文字影子,在Safari工作很好,但在IE却不行。我怎么才能对Safari和IE产生同样的影子效应呢?

<a class="feast_info" title="title">feast</a>

.feast_info {
    cursor: pointer;
    color: green;
    text-shadow: 2px 2px 2px #303030;
}
问题回答

旧版的 Internet Explorer 不执行 CSS 的构造。 您可以在您的 CSS 中使用它 :

<强>因特网探索者8:

#text_block_id {
   -ms-filter: "progid:DXImageTransform.Microsoft.DropShadow(OffX=3, OffY=3, Color=#99cc99)";
}

<强度 > 因特网探索器5.5-7:

#text_block_id {
   filter: progid:DXImageTransform.Microsoft.DropShadow(OffX=3, OffY=3, Color=#99cc99);
}

在您的 CSS 中添加这两条线, 您将得到支持的互联网探索者 5. 5 到 8 支持 。

text-shadow 没有得到 IE 的支持, 但有些建议 < a href=> http://www.hohotocreate.co.uk/textshadow.html> rel="no follow" >这里 来模拟效果。 要完全公平, < a href=> http://jsfiddle.net/ovfiddle/fRNkT/2/" rel="no follow", 结果并不令人印象深刻 。

我强烈建议坚持优雅的降解概念,放弃对不支持这些观点的浏览器的非关键影响。 如果这是绝对必须的(即品牌识别),如果其应用范围允许(即必须只存在于一个地方),您可以将预发内容作为插图提供给独立电子产品。

这将在最常见的浏览器 应用 text-shadow (见下文测试列表) :

<强 > CSS

text-shadow: 1px 1px 2px #444444;
filter: dropshadow(color=#444444, offx=1, offy=1);
filter: shadow(color=#444444,direction=135,strength=2);
-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(color=#444444,direction=135,strength=2)";

<强 > 测试:

  • Google Chrome 19.0.1084.46 m
  • Firefox 3.6.16
  • Firefox 12.0
  • Opera 11.64
  • Internet Explorer 8.0.6001.18702
  • Internet Explorer 9.0.8112.16421IC




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签