2021-05-20

css清除样式

一、
/* 清除默认样式 /
/

*{margin:0; padding:0;font-size:12px;font-family:“微软雅黑”;color: #666; border: none;}
/
/去掉所有元素的边框/
/

*:focus { outline: none; }
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header,
menu, nav, output, ruby, section, summary,
time, mark, audio, video, input, button, textarea,select{
margin: 0;
padding: 0;
font-size: 12px;
font-family: “微软雅黑”;
font-weight: normal;
color: #666;
border: none;
vertical-align: baseline;
}

body{ line-height: 1; }
ul,ol{ list-style: none; }
input,button,textarea,select,input:focus,textarea:focus{ background:none; outline:none; }
textarea{ resize: none; overflow: auto;}
select{ border: none; }
a,button{ cursor: pointer; }
a{ text-decorattion: none; blr:expression(this.onFocus=this.blur());}
blockquote, q { quotes: none; }
blockquote:before, blockquote:after, q:before, q:after { content: none; }

/* 合并表格线 && 去掉间隙 */
table{ border-collapse: collapse; border-spacing:0; }

/* 去掉webkit默认的表单样式 */
button,input,optgroup,select,textarea { -webkit-appearance:none; }

/* 去掉a、input和button点击时的蓝色外边框和灰色半透明背景 */
a,button,input,optgroup,select,textarea { -webkit-tap-highlight-color:rgba(0,0,0,0); }

/* 禁止长按链接与图片弹出菜单 */
a,img { -webkit-touch-callout: none; }

/* img,video下面产生间隙清除 */
video,img{ vertical-align:top; }

/* …_… 重置 HTML5 元素搜索 */
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video { display: block; margin: 0; padding: 0; }

/* 去掉mark默认背景颜色 */
mark{ background: none; }

/* 清除上下标位置 */
sub,sup{ vertical-align: baseline; }

/* 其它清除 /
:link, :visited,ins{
text-decoration: none;
}
:focus {
outline: 0;
}
/
禁止页面选中复制 *IE10、Oprea15以下不支持,若需要,要在需要禁止选中的元素上面添加一个属性unselectable=“on” /
/

html,body{ -moz-user-select: -moz-none; -moz-user-select: none; -o-user-select:none; -khtml-user-select:none; -webkit-user-select:none; -ms-user-select:none; user-select:none; }
*/

/* 选中颜色修改 IE10以下不支持/
::selection { background: #FF8888; color: #FFFFFF; }
::-moz-selection { background: #FF8888; color: #FFFFFF; }

/* 自定义样式 */

/* 设置浮动 */
.fl{ float: left; }
.fr{ float: right; }

/* 清除浮动 引用了bootstrap可以使用clearfix */
.clear{ clear: both; }

/* 用下面的代码去掉你要去掉的元素的边框 */
.clearoutline:focus { outline:none; }

/* 其它样式清除 */

/* 清除bootstrap中a的下划线 */
a:link{ text-decoration: none; color: #666; }

二、
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: ‘’;
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}

三、

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;
}
div{
display:none

*{box-sizing: border-box;}
html, body {
min-height: 100%;
}

body {
font-family: “Microsoft YaHei”;
font-size:14px;
color:#333;
}
h1, h2, h3, h4, h5, h6{
font-weight:normal;
}
ul,ol {
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;
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值