[英]IE not rendering CSS text correctly - background-clip
My problem is in regards to IE and how it is displaying my background clipped text. 我的问题是关于IE及其如何显示我的背景剪辑文本。
Normally (chrome/ff/etc) my code renders this: 通常(chrome / ff / etc),我的代码呈现如下:
http://i.stack.imgur.com/x9lio.png http://i.stack.imgur.com/x9lio.png
However in IE it is rendering like this: 但是在IE中,它的呈现方式如下:
http://puu.sh/3kJOx.png http://puu.sh/3kJOx.png
My code is as follows: 我的代码如下:
HTML : HTML :
<div id="centerArt">
Hi, Visitor!
</div>
CSS : CSS :
#centerArt{
font-family:"Arial", Arial, sans-serif;
font-weight: bold;
font-size: 100px;
line-height: 150px;
background-color: #565656;
color: transparent;
text-shadow: 0px 2px 3px rgba(255,255,255,0.3);
-webkit-background-clip: text;
-moz-background-clip: text;
background-clip: text;}
Is there any way to make IE behave? 有什么办法可以使IE表现良好? :)
:)
Thanks! 谢谢!
background-clip: text
is not supported in IE, valid property values are only border-box
, padding-box
and content-box
: https://msdn.microsoft.com/en-us/library/jj127314(v=vs.85).aspx background-clip: text
IE中不支持background-clip: text
,有效属性值仅是border-box
, padding-box
和content-box
: https : //msdn.microsoft.com/zh-cn/library/jj127314(v=vs。 85).aspx
You could try using @supports (-webkit-background-clip: text)
with a fallback for other browsers. 您可以尝试将
@supports (-webkit-background-clip: text)
与备用浏览器一起使用。
IE doesnt support color: transparent
value defined. IE不支持
color: transparent
定义了color: transparent
值。 Try using 尝试使用
font-size: 0;
or add IE hack background:none\\9;
或添加IE hack
background:none\\9;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.