CSS重置样式和公共样式

有时候需要写几个简单的活动页面,但是浏览器的默认样式并不是我们想要的,各个浏览器的样式还都不一样;这时候就需要对样式进行重置,写一些公共的样式,来兼容各个浏览器的默认样式了。以下是一些参考:


@charset 'utf-8';

html{color:#333;background:#eee;font-family:Arial,'Microsoft Yahei';}
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td,strong{padding:0;margin:0;font-family:Arial,'Microsoft Yahei';}
table{border-collapse:collapse;border-spacing:0;}
fieldset,img{border:0;}
a{text-decoration:none; color:#33c; outline:none;}
var,em,strong{font-style:normal;}
address,caption,cite,code,dfn,em,strong,th,var, optgroup{font-style:inherit;font-weight:inherit;}
del,ins{text-decoration:none;}
li{list-style:none;}
caption,th{text-align:left;}
h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}
q:before,q:after{content:'';}
abbr,acronym{border:0;font-variant:normal;}
sup{vertical-align:baseline;}
sub{vertical-align:baseline;}
legend{color:#333;}
input,button,textarea,select,optgroup,option{font-family:inherit; font-size:inherit;font-style:inherit;font-weight:inherit;}
input,button,textarea,select{*font-size:100%;}
body{-webkit-user-select:none;-webkit-text-size-adjust:none;-webkit-transform-style:preserve-3d;}
*{-webkit-tap-highlight-color:rgba(0,0,0,0);}
.clearfix:after {content:"\200B"; display:block; height:0; clear:both; }
.clearfix { *zoom:1; }

.text-in {               
	text-indent: 2em;
}
.text-center {
	text-align: center;
}
.text-right {
	text-align: right;
}
.cl-red {
	color: #e02525;
}
.cl-yellow {
	color: #ffec51;
}
.cl-white {
	color: #fef4de;
}
.cl-coffee {
	color: #a7660c;
}
.cl-blue {
	color: #06aaff;
}
.bg-white {
	background: #fff;
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

codehuicn

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值