html - base.css怎么写?
迷茫
迷茫 2017-04-17 12:59:00
[HTML讨论组]

前端开发时,很多人都会自定义一份base.css引入,里面包括样式重置,自定义样式等内容,想参看学习一下有经验前辈们的base.css内容!

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

全部回复(5)
天蓬老师
html,body,h1,h2,h3,h4,h5,h6,p,dl,dt,dd,ul,ol,li,p,blockquote,pre,hr,figure,table,caption,th,td,form,fieldset,legend,input,button,textarea,menu{margin:0;padding:0;}
header,footer,section,article,aside,nav,hgroup,address,figure,figcaption,menu,details{display:block;}
table{border-collapse:collapse;border-spacing:0;}
caption,th{text-align:left;font-weight:normal;}
html,body,fieldset,img,iframe,abbr{border:0;}
i,cite,em,var,address,dfn{font-style:normal;}
[hidefocus],summary{outline:0;}
li{list-style:none;}
h1,h2,h3,h4,h5,h6,small{font-size:100%;}
sup,sub{font-size:83%;}
pre,code,kbd,samp{font-family:inherit;}
q:before,q:after{content:none;}
textarea{overflow:auto;resize:none;}
label,summary{cursor:default;}
a,button{cursor:pointer;}
h1,h2,h3,h4,h5,h6,em,strong,b{font-weight:normal;}
del,ins,u,s,a,a:hover{text-decoration:none;}
body,textarea,input,button,select,keygen,legend{font:12px/1.14 arial,simsun;color:#333;outline:0;}
body{background:#fff;}
a,a:hover{color:#333;}

基本的有一些,具体项目还是要具体再修改,比如背景颜色,文字颜色,文字大小,a链接等~

伊谢尔伦

可以参考一下一些国内的base.css库,更接地气。
http://aliceui.org/
支付宝的css库

ringa_lee

建议看看这个,现在我们公司一般是用normalize.css
介绍文章:来,让我们谈一谈 Normalize.css
下载地址4L已经给出了,点个赞

PHP中文网

也可以看看这个:CSS reset的重新审视 – 避免样式重置,另外一种思路

高洛峰

用世界通用的normalize.css,bootstrap框架就是用的这个
传送门:http://necolas.github.io/normalize.css/

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

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