zoukankan      html  css  js  c++  java
  • 初始化CSS

     不同的浏览器默认样式不一样,所以容易出现兼容性问题,每次写网页时都应该都网页的css或HTML标签进行初始化

    这样可以节约代码,节约网页下载时间,是网页内容更加简洁,

    大致需要初始化的地方有

    H1-H4标签,table标签,文字大小,文字没有链接,超链接样式,DIV,居中,ol,ul,li,img等等的样式,

    一些示例:

    body,div,dl,dt,dd,ul,ol,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{
    
      margin:0;
    
      padding:0;
    
    }
    
    body{
    
      background:#fff;
    
      color:#555;
    
      font-size:14px;
    
      font-family:Verdana,Arial,Helvetica,sans-serif;
    
    }
    
    td,th,caption{
    
      font-size:14px;
    
    }
    
    h1,h2,h3,h4,h5,h6{
    
      font-weight:normal;
    
      font-size:100%;
    
    }
    
    address,caption,cite,code,dfn,em,strong,th,var{
    
      font-style:normal;
    
      font-weight:normal;
    
    }
    
    a{
    
      color:#555;
    
      text-decoration:none;
    
    }
    
    a:hover{
    
      text-decoration:underline;
    
    }
    
    img{
    
      border:none;
    
    }
    
    ol,ul,li{
    
      list-style:none;
    
    }
    
    input,textarea,select,button{
    
      font:14px Verdana,Helvetica,Arial,sans-serif;
    
    }
    
    table{
    
      border-collapse:collapse;
    
    }
    
    html{
    
      overflow-y:scroll;
    
    }
    
    .clearfix:fater{
    
      content:".";
    
      dispaly:block;
    
      height:0;
    
      clear:both;
    
      visiblity:hidden;
    
    }
    
    .clearfix{
    
      *zoom:1;
    
    }
  • 相关阅读:
    指针作为函数参数
    二级指针与多级指针
    指针数组与数组指针
    指针与数组
    指针引入
    Python中调用自然语言处理工具HanLP手记
    HanLP中的人名识别分析详解
    自然语言处理中的分词问题总结
    Hanlp实战HMM-Viterbi角色标注中国人名识别
    Hanlp中使用纯JAVA实现CRF分词
  • 原文地址:https://www.cnblogs.com/moli-/p/6486084.html
Copyright © 2011-2022 走看看