voice-family: "\"}\"";的作用
关键字: voice-family: "\"}\"";, voice-family,IE5x作为针对IE5x的一种hack,使用实例如下:
- #centercontent {
- background:#fff;
- margin-left: 199px;
- margin-right:199px;
- border:1px solid #000;
- voice-family: "\"}\"";
- voice-family: inherit;
- margin-left: 201px;
- margin-right:201px;
- }
IE5x PC mis-implements the box model. Because of that we sometimes have
to perform a little CSS trickery to get pixel-perfect display across browsers.
The following bit of code was proposed by Tantek Celik, and it preys upon a CSS
parsing bug in IE5x PC that will prematurly close a style rule when it runs
into the string "\"}\"". After that string appears in a rule, then, we can override
previously set attribute values and only browsers without the parse bug will
recognize the new values. So any of the name-value pairs above this comment
that we need to override for browsers with correct box-model implementations
will be listed below.
We use the voice-family property because it is likely to be used very infrequently,
and where it is used it will be set on the body tag. So the second voice-family value
of "inherit" will override our bogus "\"}\"" value and allow the proper value to
cascade down from the body tag.
The style rule immediately following this rule offers another chance for CSS2
aware browsers to pick up the values meant for correct box-model implementations.
It uses a CSS2 selector that will be ignored by IE5x PC.
Read more at http://www.glish.com/css/hacks.asp
发表评论
- 浏览: 47269 次
- 性别:

- 来自: 上海

- 详细资料
搜索本博客
我的相册
共 46 张
最近加入圈子
链接
最新评论
-
成功的用户体验必须遵循的 ...
是的,真正从用户需求和网站目标开始说起的话,有很多可以说~ 等后面有时间写点更加 ...
-- by tiger.passion -
成功的用户体验必须遵循的 ...
还可以说的更详细点阿!
-- by lxdhdgss -
SEO之网站结构优化
有没有 优化 比较好的 网站例子 共享下
-- by 风雪涟漪 -
SEO之网站结构优化
不错 。学习了。期待有更好的文章
-- by 风雪涟漪 -
Firefox 3 Beta 4已完成测 ...
迫不及待呀
-- by boy in the road






评论排行榜