2011-10-08 31 views
6

所以我有一些简单的风格here previosly Chrome的渲染它一样FF - 这样Google Chrome中的文字阴影发生了什么?

soft FF 4 rendering

和遍布突然我期待我在Chrome的文档,看看这个

enter image description here

所有阴影都不透明=(如何处理tham - 如何修复?

enter image description here

CSS code

body{padding: 5px;background-color: #FFF;font: 100.01% "Trebuchet MS",Verdana,Arial,sans-serif} 
h1,h2,p{margin: 0 10px} 
h1,h2{font-size: 250%;color: #FFF; text-shadow: 0px 1px 1px #000;} 
h2{font-size: 120%;} 
div#nifty{ margin: 0 1%;background: #9BD1FA} 
b.rtop, b.rbottom{display:block;background: #FFF} 
b.rtop b, b.rbottom b{display:block;height: 1px;overflow: hidden; background: #9BD1FA} 
b.r1{margin: 0 5px} 
b.r2{margin: 0 3px} 
b.r3{margin: 0 2px} 
b.rtop b.r4, b.rbottom b.r4{margin: 0 1px;height: 2px} 
p{color: #000;text-shadow: 0px 1px 1px #fff;padding-bottom:0.3em} 
input[type="button"], .eButton {width: 150px;padding: 5px 10px;word-wrap: break-word;height: auto;}} 
::-moz-selection { background-color: #fbfdfe; color: #ff6c24; text-shadow: 0px 1px 1px #258ffd;} 
::selection { background-color: #fbfdfe; color: #fff; text-shadow: 0px 1px 1px #258ffd;} 
+0

在OS X 10.7的Chrome 14.0.835.202&16.0.903上看起来很好。 –

+0

Windows Chrome 14.0.835.202 m给我带来了问题,16.0.903.0 canary以一种非常奇怪的方式工作 - 首先它以不好的方式渲染它,但在很短的时间内它将它变成可变的FF。 – Rella

+0

XP上的Chrome 15.0.874.83 beta-m对我来说有同样的问题。另外,你拼写输入为'inpuut'。 – Eric

回答

1

如果您正在寻找半透明阴影,您可以尝试使用RGBA值,而不是十六进制值。所以它会是:

h1 { text-shadow: 1px 1px 1px rgba(0,0,0,.20); } 

其中前三个数字是RBG值(红,绿,蓝)和第四个数字是不透明度(从0到1)。所以上面的例子是黑色的,不透明度为20%。

而且,奇怪的影子重量似乎是从上text-shadow模糊值到来。当我将其更改为1px 1px 0时,它会提供比0px 1px 1px更均匀的阴影。不知道为什么。