• CSS Reset(css的初始化)


     不同的浏览器对每种的标签都有默认的样式。大部分浏览器的样式还有点区别。为了保证让所有的标签的样式清零,也就是重置,以便于我们后续的开发和管

    理,一般都会在网站一开始对所有的标签做一下样式的重置操作,为此我们新建一个css文件,css代码如下:

     1 @charset "utf-8";
     2 
     3 html{
     4     color:#000;
     5     background:#FFF;
     6 }
     7 body,
     8 div,
     9 dl,
    10 dt,
    11 dd,
    12 ul,
    13 ol,
    14 li,
    15 h1,
    16 h2,
    17 h3,
    18 form,
    19 fieldset,
    20 input,
    21 textarea,
    22 p,
    23 blockquote,
    24 th,
    25 td {
    26     margin:0;
    27     padding:0;
    28 }
    29 table {
    30     border-collapse:collapse;
    31     border-spacing:0;
    32 }
    33 a {
    34     text-decoration: none;
    35 }
    36 em,
    37 strong,
    38 b,
    39 u,
    40 i{
    41     font-style:normal;
    42     font-weight:normal;
    43 }
    44 ol,
    45 ul {
    46     list-style:none;
    47 }
    48 h1,
    49 h2,
    50 h3{
    51     font-size:100%;
    52     font-weight:normal;
    53 }
    54 input,
    55 textarea,
    56 select {
    57     font-family:inherit;
    58     font-size:inherit;
    59     font-weight:inherit;
    60     *font-size:100%; /*to enable resizing for IE*/
    61 }
    62 img {
    63     border: 0 none;
    64 }
    65 input {
    66     border: none;
    67 }

    详情参照雅虎css样式重置:https://github.com/yui/yui3/blob/master/src/cssreset/css/cssreset.css

  • 相关阅读:
    LeetCode 25 Reverse Nodes in k-Group
    圆桌派:家世背景对人的影响有多大
    BibTex 学习笔记
    R parallel包实现多线程1
    IIS学习笔记
    高效完成R代码
    圆桌派 :我们,朋友一生一起走
    高文欣个人简介
    R语言函数话学习笔记5
    git学习笔记1
  • 原文地址:https://www.cnblogs.com/cuibin/p/6708208.html
Copyright © 2020-2023  润新知