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;
    
    }
  • 相关阅读:
    查看文件方法、vim末行操作
    目录结构、文件管理命令
    计算机快捷键、常用命令、别名、
    Redis 使用与优化
    Redis-Sentinel
    Redis主从复制
    Redis持久化
    API的使用
    Redis安装和配置
    集群搭建(脑裂)
  • 原文地址:https://www.cnblogs.com/moli-/p/6486084.html
Copyright © 2011-2022 走看看