Rumah > hujung hadapan web > html tutorial > 我的全局样式,求高手指点_html/css_WEB-ITnose

我的全局样式,求高手指点_html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Lepaskan: 2016-06-21 09:40:02
asal
878 orang telah melayarinya

body{margin:0 auto; font:12px/20px '宋体','arial'; background:#fff; color:#000}*{margin:0; padding:0; border:0}ul,ol,li,dl,dd,dt{list-style:none}input{font-family:Arial}em{font-style:normal}h1,h2,h3,h4,h5,h6,font{font-weight:normal}a{text-decoration:none}a:hover{text-decoration:none}a:visited{}a:active{}.f14{font-size:14px}.fb{font-weight:bold}.fi{font-style:italic}.clear{clear:both; font-size:1px; visibility:hidden}.blank7{margin:0 auto; height:7px; font-size:1px; clear:both}.container{width:960px; margin:0 auto}.container .head{height:318px; background:url(../images/head01.jpg) center top no-repeat}.content01{}.footer{}.popup{}
Salin selepas log masuk


我的全局样式,求高手指点


回复讨论(解决方案)

单从样式看不出来太多内容。。

image的border样式最好也预设下(一般为none)。

另外,我喜欢把a:hover放在a的样式最后一个,这样不受之前的visited的影响。。。

background:...
最好拆分一下,例如是背景色就写background-color:...

这样更明确一些。。

html /*IE6bug */{ _background-image:url(about:blank); _background-attachment:fixed;}/*reset*/div{ display:block;}body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, textarea, p, blockquote, th, td { padding: 0;margin: 0;}table { border-collapse: collapse; border-spacing: 0; }fieldset, img { border: 0; }address, caption, cite, code, dfn, em, strong, th, var { font-weight: normal; font-style: normal; }ol, ul { list-style: none; }caption, th { text-align: left; }h1, h2, h3, h4, h5, h6 { font-weight: normal; font-size: 100%; }q:before, q:after { content: ''; }abbr, acronym { border: 0; }/*reset*/
Salin selepas log masuk


全局样式主要是清除 浏览器默认样式,在做设置全局样式。

看看yui.reset.css,kissy.reset.css吧。

这个大同小异,根据自己的结构,写出不同的 全局样式。

Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan