第10章 CSS应用:混合布局(第二部分)

1. diaplay: none 

  W3C: This value causes an element to generate no boxes in the formatting structure (i.e., the element has no effect on layout). Descendant elements do not generate any boxes either; this behavior cannot be overridden by setting the ‘display’ property on the descendants.

     visibility: hidden

  W3C: the generated box is invisible (fully transparent), but still affects layout.

  Google能够读取到隐藏的文本,而有些屏幕阅读器却不能读出隐藏的文本,可用{text-indent:-9999px;}隐藏可视文本,{position:absolute;left:-9999px;}来隐藏可视元素。

 

2. IE/Win早期版本对a:active实现有错误,所以尽量少用a:active;

  {font-family: Georgia, "New Century Schoolbook", Times, Serif;}——Georgia就算字形很小也清晰可辨,几乎存在所有的Win和Mac系统中;New Century Schoolbook存在于大多数Unix系统中;Times存在于Paleolithic计算系统里;serif最一般;

  IE6/Win存在随机Bug,可能使文档默认居中,所以应该在CSS中说明对齐方式;

  单元格内的链接<a>设置为block,使用{width:100%;}会比定像素更好,能在更多的浏览器上充分填充单元格;

 

posted on 2013-04-27 09:41  BigPalm  阅读(82)  评论(0编辑  收藏  举报

导航