css清除默认样式和设置公共样式

/*公共样式--开始*/

html, body, div, ul, li, h1, h2, h3, h4, h5, h6, p, dl, dt, dd, ol, form, input, textarea, th, td, select {

    margin:0;

    padding:0;

}

*{box-sizing:border-box;}

html, body {

min-height:100%;

}

body {

    font-family:"Microsoft YaHei";

    font-size:14px;

    color:#333;

}

ul,ol,li {

list-style:none;

}

img {

border:none;

    vertical-align:middle;

}

a {

text-decoration:none;

 color:#232323;

}

table {

    border-collapse:collapse;

    table-layout:fixed;

}

input, textarea {

    outline:none;

    border:none;

}

textarea {

    resize:none;

    overflow:auto;

}

.clearfix {

    zoom:1;

}

.clearfix:after {

    content:".";

    width:0;

    height:0;

    visibility:hidden;

    display:block;

    clear:both;

    overflow:hidden;

}

.fl {

    float:left

}

.fr {

    float:right

}

.tl {

    text-align:left;

}

.tc {

    text-align:center

}

.tr {

    text-align:right;

}

.ellipse {

    overflow:hidden;

    text-overflow:ellipsis;

    white-space:nowrap;

}

.inline{

    display:inline-block;

    *display:inline;

    *zoom:1;

}

欢迎留言补充完善!

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 问答题47 /72 常见浏览器兼容性问题与解决方案? 参考答案 (1)浏览器兼容问题一:不同浏览器的标签默认的外补...
    _Yfling阅读 14,692评论 1 92
  • 1、垂直对齐 如果你用CSS,则你会有困惑:我该怎么垂直对齐容器中的元素?现在,利用CSS3的Transform,...
    kiddings阅读 8,406评论 0 11
  • 这妹子实在是太牛掰了。看了这么多天还是觉得太牛掰了,所以就记下来了,^_^
    Roy致胜阅读 4,088评论 0 0
  • 连续下了两天的大雨,培训回来看着办公室位置的这滩水,一想到后面三段时间的培训,在看到本来给孩子说...
    阿雒阅读 1,184评论 0 0

友情链接更多精彩内容