css通用样式

本文详细介绍了一套CSS基础样式设置,包括元素默认样式清除、文本对齐方式、背景颜色及图片边框设置等内容,并提供了不同级别标题、链接、列表等元素的具体样式规范。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dd, dl, dt, li, ol, ul, fieldset, form, label, legend{

margin: 0; padding: 0; border: 0; outline: 0; font-weight: inherit; font-style: inherit; font-family: inherit; font-size:100%; text-align: left;

vertical-align: baseline;

}

img {

border:none;

}

table {

border-collapse: collapse; border-spacing: 0;

}

q:before, q:after, blockquote:before, blockquote:after {

content: "";

}

/* 基础样式----------------------------------------*/

body{

text-align:center; background:#cbcbcb; background:url(../images/bg.jpg);

}

body, p, td, th, li{

font-family: Arial, Helvetica, sans-serif; font-size:12px; line-height:1.5em; color:#666666;

}

p{

margin: 0 0 1em 0;

}

/*--- 链接样式 ---*/

a{

text-decoration:none; color:#666666;

}

a:hover, a:active{

text-decoration:none;

}

a h2{

cursor:pointer;

}

h1{ margin:.825em 0 .5em 0; font-size:2.125em;}
h2{ margin:.825em 0 .5em 0; font-size:1.75em;}
h3{ margin:.825em 0 .5em 0; font-size:1.5em;}
h4{ margin:.825em 0 .5em 0; font-size:1.25em;}
h5{ margin:.825em 0 .5em 0; font-size:1.125em;}
h6{ margin:.825em 0 .5em 0; font-size:1em;}
ul{ margin-left:25px; list-style-type:none;}
ol{ margin-left:25px;}

blockquote {

margin: 0 0 18px 18px; font-style: italic;

}

strong {font-weight:bold;}

em {font-style:italic;}


/* 常用样式----------------------------------------*/

.left {float:left;}

.right {float:right;}

.clear {clear:both;}

.small {font-size:.625em;}

.large {font-size:1em;}

.soft {color:#D3D3D3;}

.hide {display:none;}

p.last {margin-bottom:0px;}


在这里作者要说一下,由于是个人习惯问题,不一定所有的观点都是正确的,具体问题具体分析,还望大家包涵,不懂得可以多提问,我会为大家解答。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值