來源: GQ_cyan 發(fā)布時間:2018-11-22 14:18:20 閱讀量:1346
一,首先,拿到設(shè)計圖后進行分析劃分。
利用從上到下,先整體后局部的規(guī)則進行工作順序的確定。
二,創(chuàng)建網(wǎng)站文件夾:css,js,jmage,index.html
三,進行CSS初始化,其目的是消除固有元素的格式使網(wǎng)站更為協(xié)調(diào)
雅虎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軟件進行設(shè)計圖的測量以及處理。
注意:文字垂直居中,設(shè)置line_height與height相同即可。
測板心及各需要部分。
五,精靈圖的制作
首先,建立一張透明圖文件,接著,將所需圖片截取后移到圖文件上左上角對齊,其余各圖留有一定空隙放置。
使用,需結(jié)合background屬性使用,注意此屬性可以上下移動對齊位置以找到所需圖案。
注意:在css中寫display:inline-black;width:..;height:..;background:url() x y;
---------------------