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

php中文网
发布: 2016-06-21 09:40:02
原创
953人浏览过

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{}
登录后复制


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

智谱清言 - 免费全能的AI助手
智谱清言 - 免费全能的AI助手

智谱清言 - 免费全能的AI助手

智谱清言 - 免费全能的AI助手 2
查看详情 智谱清言 - 免费全能的AI助手

回复讨论(解决方案)

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

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*/
登录后复制


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

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

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

HTML速学教程(入门课程)
HTML速学教程(入门课程)

HTML怎么学习?HTML怎么入门?HTML在哪学?HTML怎么学才快?不用担心,这里为大家提供了HTML速学教程(入门课程),有需要的小伙伴保存下载就能学习啦!

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号