css样式重置

css样式重置(css样式初始化): 是为了代码在各浏览器保持兼容性,表现效果一致,这是由于不同浏览器对某些标签的默认样式不一致,而且也是为了开发的方便和效率也有必要初始化。

对于某些汉字则推荐使用unicode编码代替:
宋体:\5B8B\4F53
新宋体:\65B0\5B8B\4F53
黑体:\9ED1\4F53
微软雅黑:\5FAE\8F6F\96C5\9ED1
楷体_GB2312:\6977\4F53_GB2312

body,
th,
td,
form,
input,
button,
select,
option,
textarea,
p,
ul,
ol,
li,
dl,
dt,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
legend,
fieldset,
pre,
blockquote,
hr {
  padding: 0;
  margin: 0;
}

input,
button,
textarea,
select {
  outline: none;
  font: 100%/1.5 'microsoft YaHei', '\5b8b\4f53', sans-serif;
}

body {
  font: 12px/1.5 'microsoft YaHei', '\5b8b\4f53', sans-serif;
  color: #333;
  background: #fff;
}

img {
  border: 0; /* ie下的默认黑边框 */
  vertical-align: middle; /* 图片下的间隙,也可以用display: block */
}

a {
  color: #666;
  text-decoration: none;
}

a:hover {
  color: #c81623;
}

button {
  border: 0;
  cursor: pointer;
  border-radius: 0;
}

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

em,
i {
  font-style: normal;
}
b,
strong {
  font-weight: 0;
}
del,
s,
ins,
u {
  text-decoration: none;
}

h1,h2,h3,h4,h5,h6{
  font-weight: 400;
  font-size: 100%;
}


.fl {
  float: left;
}

.fr{
  float: right;
}

.clearfix::before,
.clearfix::after{
  content: '';
  display: table;
}

.clearfix::after{
  clear: both;
}

.clearfix {
	*zoom: 1; /* 兼容旧版本ie */
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值