简单html以及css的用法详解

2020-04-17 20:34:05易采站长站整理

img {   
    border: 0;   
    vertical-align: middle; /*  去掉图片底部默认的3像素空白缝隙*/   
}   
  
table {   
    border-collapse: collapse; /*合并外连线*/   
}   
  
body {   
    font: 12px/150% Arial, Verdana, "5b8b4f53"; /*unitedCode的写法,宋体的写法*/   
    color: #666; /*150%基于当前字体尺寸的百分比行间距*/   
    background: #fff;   
}   
  
.clearfix:before, .clearfix:after {   
    /*清除浮动,最好最标准的写法*/   
    content: "";   
    display: table;   
}   
  
.clearfix:after {   
    clear: both;   
}   
  
.clearfix {   
    *zoom: 1; /*IE/7/6*/  /*兼容IE6下的写法*/   
}   
  
a {   
    color: #666;   
    text-decoration: none;   
}   
  
a:hover {   
    color: #C81623;   
}   
  
h1, h2, h3, h4, h5, h6 {   
    text-decoration: none;   
    font-weight: normal;   
    font-size: 100%;   
}   
  
s, i, em {   
    font-style: normal;   
    text-decoration: none;   
}   
  
.col-red {   
    color: #C81623 !important;/*京东主色调*/   
}   
  
/*公共类*/   
.w {   
    /*版心 提取 */   
    width: 1210px;   
    margin: 0 auto;   
}   
  
.fl {   
    float: left;   
}   
  
.fr {   
    float: right;   
}