文本阴影:IE8 [英] Text-Shadow: IE8

查看:397
本文介绍了文本阴影:IE8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,所以我试图在各种浏览器上实现 text-shadow 。我有IE6,IE7,FF,Chrome和Opera都工作...但IE8不显示任何阴影,除非它在兼容性视图。



ve通过search / Google查看了一些解决方案,但是阴影仍然只出现在兼容性视图中。



有关如何获取它的任何想法

b
$ b

编辑:补充说,我使用Modernizr,我点击了错误的按钮在我的测试仪。这在IE9中不起作用,但我不认为它是相关的。



CSS:

  #links li a {
font-size:24px;
text-shadow:0 3px 3px#102530,0 3px 3px#102530;
/ *对于IE 8 * /
-ms-filter:progid:DXImageTransform.Microsoft.Shadow(Strength = 4,Direction = 90,Color ='#102530');
/ *对于IE 5.5 - 7 * /
filter:progid:DXImageTransform.Microsoft.Shadow(Strength = 4,Direction = 90,Color ='#102530');
filter:DropShadow(Color =#102530,OffX = 0,OffY = 3);
zoom:1;
}

HTML

 < ul id =links> 
< li>< a href =#/>文字< / a>< / li>
< / ul>


解决方案

网站不一定在每个浏览器。 Plus MS过滤器是废话。
我建议使用 Modernizer 为IE8应用不同的解决方案。



它会让你头痛:)


Alright, so I'm trying to implement text-shadow across various browsers. I have IE6, IE7, FF, Chrome, and Opera all working... but IE8 wont' show any shadows unless it is in 'Compatibility View'.

I've looked at a number of 'solutions' via search / Google, but the shadow is still only appearing in 'Compatibility View'.

Any ideas on how to get it to show up without having to change modes?

Note: Using HTML5 Boilerplate and Modernizr.

edit: Added that I'm using Modernizr, and I clicked the wrong button in my tester. This isn't working in IE9 either, but I don't think it is related.

CSS:

#links li a {
font-size: 24px;
text-shadow: 0 3px 3px #102530, 0 3px 3px #102530;
/* For IE 8 */
-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=90, Color='#102530')";
/* For IE 5.5 - 7 */
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=90, Color='#102530');
filter:DropShadow(Color=#102530, OffX=0, OffY=3);
zoom: 1;
}

HTML

<ul id="links">
    <li><a href="#"/>Text</a></li>
</ul>

解决方案

A website must not necessarily look the same in every browser. Plus MS filters are crap. I would recommend to use Modernizer an apply a different solution for IE8.

It will save you from headaches :)

这篇关于文本阴影:IE8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆