Home > Web Front-end > HTML Tutorial > 我的全局样式,求高手指点_html/css_WEB-ITnose

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

WBOY
Release: 2016-06-21 09:40:02
Original
843 people have browsed it

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{}
Copy after login


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


回复讨论(解决方案)

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

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*/
Copy after login


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

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

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

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template