Deprecated: imwpcache\f884414bce24ee67f\f73723ec7b1919fa5::__construct(): Implicitly marking parameter $YECBGYFECGEAFWHA as nullable is deprecated, the explicit nullable type must be used instead in /www/wwwroot/www.chuangxiangniao.com/wp-content/plugins/imwpcache-dist/build/f884414bce24ee67ff73723ec7b1919fa5.php on line 2

Deprecated: imwpcache\f884414bce24ee67f\f73723ec7b1919fa5::__construct(): Implicitly marking parameter $BBWFDDBHHYHDXXAB as nullable is deprecated, the explicit nullable type must be used instead in /www/wwwroot/www.chuangxiangniao.com/wp-content/plugins/imwpcache-dist/build/f884414bce24ee67ff73723ec7b1919fa5.php on line 2
关于CSS Normalize的文件配置_创想鸟

关于CSS Normalize的文件配置

这篇文章主要介绍了css normalize文件配置示例,对全局项目进行设置,需要的朋友可以参考下

作为前端工程师,很多人都有自己的一套CSS Normalize文件,这样能省掉开发过程中的不少麻烦,提高工作效率。在前人的基础上,我总结了自己的CSS Normalize文件,目前基本上每个项目都有在使用中:

/*Normalize*/*{margin:0;padding:0;list-style-type:none;}   *html,*html body /* 修正IE6振动bug */{       background-image:url(about:blank);       background-attachment:fixed;   }   body{       font-family:"Microsoft Yahei","Hiragino Sans GB" ,Arial,Lucida,Verdana,SimSun,Helvetica,sans-serif;       /*font-size : 62.5%; px数值除以10,然后换上em作为单位*/    /*min-width:980px;*/    font-size:13px;   }   a,img{border:none;text-decoration:none;}   a{blr:expression(this.onFocus=this.blur());} /*去掉a标签的虚线框,避免出现奇怪的选中区域*//*a:active {test:expression(target="_blank");}*/:focus{outline:0;}   label{cursor:pointer;}   img{vertical-align:middle;}   table{empty-cells:show;border-collapse:collapse;border-spacing:0;}   h1{font-size:1.6em;}h2,h3,h4{font-size:1.4em;}h5,h6{font-size:1.2em;}   input{border:none;}   textarea{overflow:scroll;}   a, input,textarea, .hover-delay {       font-family:"Microsoft Yahei","Hiragino Sans GB", Arial,Lucida,Verdana,SimSun,Helvetica,sans-serif;       -webkit-transition: all 0.3s ease-out;       -moz-transition: all 0.3s ease-out;       -ms-transition: all 0.3s ease-out;       -o-transition: all 0.3s ease-out;       transition: all 0.3s ease-out;   }   input.none-radius{       border-radius:0;       -moz-border-radius:0;       -webkit-border-radius:0;   }   input::-ms-clear{ display:none;}  //去掉输入框的叉叉   .clear{clear:both;}   .txt-indent{text-indent:-999px;overflow:hidden;}   input[type=text],input[type=tel],input[type=email]{   -webkit-appearance: none;    box-shadow: none;}   /*Normalize end*/

对与我的实际使用中,我有一个Template文件夹(最近新增了一个针对Mobile)

里面的文件夹大致分为如下:

    1)images: 存放项目中的图片(里面又会根据项目模块进行文件夹划分)
    2)css: 存放css文件(里面会有一个base.css文件,预置上文中的css normalize)
    3)js:存放js文件,里面还有一个vender的文件夹,存放插件js(例如:jQuery库),外面有main.js(主要js文件),plugins.js(插件引用的js)

立即学习“前端免费学习笔记(深入)”;

根目录下,为index.html文件
主要为如下文件:

              <!--                        xxx                                                                                                 

Mobile下的head会有如下meta设置:

         

值得一提的是,在github上也有做了一个 normalize.css 文件,我在做HTML5项目也将其应用在normalize中。 

另外,对于很多开发中来说,Template文件同样是节省了不少写重复代码的时间,同时,又规范了自己的书写习惯。

以上就是本文的全部内容,希望对大家的学习有所帮助,更多相关内容请关注PHP中文网!

相关推荐:

CSS的变量variable的解析

CSS的positon属性的分析

以上就是关于CSS Normalize的文件配置的详细内容,更多请关注创想鸟其它相关文章!

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 chuangxiangniao@163.com 举报,一经查实,本站将立刻删除。
发布者:程序猿,转转请注明出处:https://www.chuangxiangniao.com/p/1610125.html

赞 (0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2025年12月24日 01:15:14
下一篇 2025年12月24日 01:15:33

相关推荐

发表回复

登录后才能评论
关注微信