web前端实战总结.

来源: GQ_cyan 发布时间:2018-11-22 14:18:20 阅读量:914

一,首先,拿到设计图后进行分析划分。


        利用从上到下,先整体后局部的规则进行工作顺序的确定。


二,创建网站文件夹:css,js,jmage,index.html


三,进行CSS初始化,其目的是消除固有元素的格式使网站更为协调          


雅虎css初始化代码:

<span style="font-family: Arial, Helvetica, sans-serif;">body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td { margin:0; padding:0; }</span>

body { background:#fff; color:#555; font-size:14px; font-family: Verdana, Arial, Helvetica, sans-serif; }

td,th,caption { font-size:14px; }

h1, h2, h3, h4, h5, h6 { font-weight:normal; font-size:100%; }

address, caption, cite, code, dfn, em, strong, th, var { font-style:normal; font-weight:normal;}

a { color:#555; text-decoration:none; }

a:hover { text-decoration:underline; }

img { border:none; }

ol,ul,li { list-style:none; }

input, textarea, select, button { font:14px Verdana,Helvetica,Arial,sans-serif; }

table { border-collapse:collapse; }

html {overflow-y: scroll;} 

 

.clearfix:after {content: "."; display: block; height:0; clear:both; visibility: hidden;}

.clearfix { *zoom:1; }

四,利用ps软件进行设计图的测量以及处理。


     注意:文字垂直居中,设置line_height与height相同即可。


     测板心及各需要部分。


五,精灵图的制作


        首先,建立一张透明图文件,接着,将所需图片截取后移到图文件上左上角对齐,其余各图留有一定空隙放置。


        使用,需结合background属性使用,注意此属性可以上下移动对齐位置以找到所需图案。


         注意:在css中写display:inline-black;width:..;height:..;background:url() x y;

--------------------- 



标签: PHP
分享:
评论:
你还没有登录,请先