栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > Web开发 > Html/CSS

CSS样式重置和清除(让不同浏览器显示效果一致)

Html/CSS 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

CSS样式重置和清除(让不同浏览器显示效果一致)

为了让页面在各不同浏览器之间显示效果一致,CSS样式清除和重置是前端开发必需要做的事情,结合前车之鉴,整理了份CSS重置样式代码供参考。

复制代码代码如下:
@charset "utf-8";
body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, pre,
dl, dt, dd, ul, ol, li, th, td, div, span, img,
fieldset, lengend, button, input, select, textarea{margin: 0;padding: 0;}

html{color:#000; background:#FFF;}

body, button, input, select, textarea {
font: 12px/18px Arial, Verdana, Microsoft YaHei;
}

html,body {height: 100%;margin: 0 auto;}

h1 {font-size: 18px;}
h2 {font-size: 16px;}
h3 {font-size: 14px;}
h4, h5, h6 {font-size: 100%;}

a { text-decoration: none; }
a:hover { text-decoration: underline; }

ul,ol {list-style: none;}

fieldset,img{border: 0}

table {border-collapse: collapse;border-spacing: 0;font:inherit;}

.alpha {margin-left: 0;}
.omega {margin-right: 0;}

.left{float:left;}
.right{float:right;}
.clear {clear: both;display: block;}

.clearfix:after{content:".";display:block;}
.clearfix{display:inline-table;}

* html .clearfix{height:1%;}
.clearfix{display:block;}

*+html .clearfix{min-height:1%;}
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/218013.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号