为什么 MS 滤镜(dropShadow、辉光或阴影)不适用于 IE 中的标签?
我只想将文本阴影应用于 Internet Explorer 6-9 中的 元素。我正在使用以下 CSS 代码。
.dropShadow { filter: dropshadow(color=#ffff00,offX=5,offY=5); }
.glow { filter: glow(color=#ff0000); }
.shadow { filter: shadow(color=#00ff00); }
使用此 HTML:
<span class="dropShadow">span with dropShadow</span>
<p class="dropShadow">paragraph dropShadow</p>
<span class="glow">span with glow</span>
<p class="glow">paragraph with glow</p>
<span class="shadow">span with shadow</span>
<p class="shadow">paragraph with shadow</p>
结果是只有
元素会接收 dropShadow、glow 和 shadow风格。但是
将不会应用样式。为什么?
I just want to apply text shadow to <span>
elements in Internet Explorer 6-9. I'm using the following CSS code.
.dropShadow { filter: dropshadow(color=#ffff00,offX=5,offY=5); }
.glow { filter: glow(color=#ff0000); }
.shadow { filter: shadow(color=#00ff00); }
With this HTML:
<span class="dropShadow">span with dropShadow</span>
<p class="dropShadow">paragraph dropShadow</p>
<span class="glow">span with glow</span>
<p class="glow">paragraph with glow</p>
<span class="shadow">span with shadow</span>
<p class="shadow">paragraph with shadow</p>
The result is that only <p>
elements will receive the dropShadow, glow and shadow styles. But <span>
will not get styles applied. Why?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将
display:inline-block
添加到您的跨度中。http://jsbin.com/ipiqak/edit#preview
You could add
display:inline-block
to your spans.http://jsbin.com/ipiqak/edit#preview