辽宁省招生考试之窗网:div+css - Firefox和IE浏览器兼容问题 - 用CSS实现cellSpacing属性效果

来源:百度文库 编辑:九乡新闻网 时间:2024/05/04 14:56:22

div+css -  Firefox和IE浏览器兼容问题 - 用CSS实现cellSpacing属性效果

[用CSS实现cellSpacing属性效果 - 示例代码]


   
   
   
       

            非CSS的cellSpacing实现
       

       
           
               
               
           
           
               
               
           
       
12
34

       

            用CSS实现时,Firefox中支持border-spacing,而IE不支持。
       

       
           
               
               
           
           
               
               
           
       
12
34

       

            用CSS实现时,IE不直接支持,但是可以借助于expression实现,而Firefox不支持。
       

       
           
               
               
           
           
               
               
           
       
12
34

       

            同时使用时,可以实现兼容Firefox和IE的cellSpacing效果。
       

       
           
               
               
           
           
               
               
           
       
12
34

   

[div+css - 关键词]

div css

[div+css - 论坛]

http://WebDev.board.newsmth.net/
http://WebGeeks.board.newsmth.net/
http://bbs.pku.edu.cn/, homepage看版
http://forum.csdn.net/SList/HTMLCSS/
http://groups.google.com/group/alt.html
http://groups.google.com/group/comp.infosystems.www.authoring.html
http://groups.google.com/group/comp.infosystems.www.authoring.stylesheets

[div+css - 工具]

Internet Explorer Developer Toolbar, http://www.microsoft.com/downloads/details.aspx?FamilyID=e59c3964-672d-4511-bb3e-2d5e1db91038&displaylang=en

The W3C Markup Validation Service:, http://validator.w3.org/

[div+css - 常见问题]

较验div+css格式,http://validator.w3.org/
div+css的margin缩写方式
div+css的padding缩写方式
链接的:link,:visited,:hover,:active四种状态

div+css使用backgroundRepeat样式设置背景图片的显示方式, http://msdn2.microsoft.com/en-us/library/ms530721.aspx

page-break-before设置打印分布符

url()指示符, http://www.w3.org/TR/CSS21/syndata.html#value-def-uri

!important规则, http://www.w3.org/TR/CSS21/cascade.html#important-rules

table中直接输入的文字和其他标记设置不同的颜色

CSS标准中级联的文档, http://www.w3.org/TR/CSS21/cascade.html#cascade

 

 

 

 

[div+css - Firefox和IE浏览器兼容问题]

水平居中,Firefox使用margin-left: auto; margin-right: auto; IE6 使用text-align: center;
垂直居中,Firefox中使用display: table-cell; vertical-align: middle;可以实现div垂直居中,而IE6中则需要借助IE6中css的特点实现垂直居中。
!important标记,Firefox支持!important标记,IE6忽略!important标记,!important需要放在前面才能起作用
手形鼠标指针,使用cursor: pointer;
padding的尺寸,在Firefox中padding是计算在width之外的,而IE6是计算在width之内的
margin的尺寸,在IE6中带有float样式的元素的margin尺寸计算有误,需要借助padding和!important标记实现兼容

使用word-wrap设置自动折行, 仅对IE有效

  • 在Firefox下会丢失左侧的圆点

    Internet Explorer的CSS参考资料, http://msdn2.microsoft.com/en-us/library/ms531209.aspx

    用CSS实现cellSpacing属性效果, border-spacing: 10px; border-spacing: expression(this.cellSpacing=10);

     

     

     

    [div+css - CSS标准]

     

    Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification:级联样式表第2级第1次修改(CSS 2.1)规范, http://www.w3.org/TR/CSS21/

    4.3.2 Lengths长度, http://www.w3.org/TR/CSS21/syndata.html#length-units

     

    边距属性, http://www.w3.org/TR/CSS21/box.html#propdef-margin-top

    8.5 Border properties边框属性, http://www.w3.org/TR/CSS21/box.html#border-properties

     

    [div+css - XHTML标准]

    5.6. Table Modules - Table模块, http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#sec_5.6.

    [div+css - 其他HTML问题]

    使用OPTGROUP对SELECT中的OPTION分组

    nowrap标记设置不自动折行, http://www.w3.org/TR/1998/REC-html40-19980424/struct/tables.html#adef-nowrap

    leftmargin设置页面左边距, topmargin设置页面上边距

    disabled属性, http://msdn2.microsoft.com/en-us/library/ms533732.aspx

     

    About Font Embedding:关于字体嵌入, http://msdn2.microsoft.com/en-us/library/ms533034.aspx