在上一篇文章中,提到了一些修改網站模板中常用到的方法,工具。但其中也牽涉到不到關于CSS樣式表的一些知識,對于這些知識,缺乏的還占大多數,今天我就將常用的一些CSS樣式表語法整理一下,發出來給大家,希望對各位站長朋友修改網站模板的時候有一些幫助。如果你還沒閱讀過上一篇文章,請先移步至《關于淘客模板修改的一些心得總結》。
liehuo.net
CSS樣式表的出現就是為了規范網頁結構,網頁中的所有框架,無一例外的都通過CSS樣式表來定義其樣式,大小、位置,邊框位置等……詳見下表: veryhuo.com
邊框寬度 : border-width : 5px; /網
上邊寬度 : border-top-width : 5px;
左邊寬度 : border-left-width : 5px;
右邊寬度 : border-right-width : 5px;
底邊寬度 : border-bottom-width : 5px;
liehuo.net
邊框顏色 : border-color : #000000;
veryhuo.com
上邊顏色 : border-top-color : #000000;
邊框樣式 : border-style : double; 可替換 dashed; dotted; none;
veryhuo.com
上邊樣式 : border-top-style : solid;
/網
左邊樣式 : border-left-style : inset; veryhuo.com
右邊樣式 : border-right-style : ridge;
liehuo.net
底邊樣式 : border-bottom-style : solid;
veryhuo.com
整體寬度 : width : 5px;
veryhuo.com
整體高度 : height : 5px; veryhuo.com
溢出選項 : overflow : visible; 可替換 hidden; scroll; auto;
liehuo.net
內側邊距 : padding : 5px;
上內邊距 : padding-top : 5px;
veryhuo.com
外側邊距 : margin : 5px;
上外邊距 : margin-top : 5px; veryhuo.com
文字字體 : font-family : fantasy; liehuo.net
文字大小 : font-size : 12pt; liehuo.net
文字粗細 : font-weight : bold; /網
文字樣式 : font-style : italic;
文字變量 : line-height : 110%; liehuo.net
清除屬性 : clear : left; 可替換 right; both; none;
網
浮動屬性 : float : left; 可替換 right; none; wfuwu.com
水平排列 : text-align : left; 可替換 right; center; justify; liehuo.net
文本修飾 : text-decoration : underline; 可替換 overline; underline overline; line-through; blink; veryhuo.com
文本縮進 : text-indent : 5em; liehuo.net
文字間距 : letter-spacing : 5px;
veryhuo.com
字母間距 : word-spacing : 5px; -網
文本轉換 : text-transform : capitalize; 可替換 lowercase; uppercase;
/網
垂直排列 : vertical-align : baseline; 可替換 top; middle; bottom; text-top; text-bottom; super; sub; 3em; 30%;
背景圖片 : background-image : url(tianyi.gif);
veryhuo.com
背景拉伸 : background-repeat : repeat; 可替換 repeat-x; repeat-y; no-repeat; veryhuo.com
背景定位 : background-position : left; 可替換 right; top; left top; right bottom; 30% 50%;
附加屬性 : background-attachment : fixed; 可替換 scroll; -網
顯示屬性 : display : none; 可替換 block; inline; run-in; compact; list-item; marker; &網
是否可見 : visibility : visible; 可替換 hidden; liehuo.net
資源定位 : position : static; 可替換 relative; absolute; fixed;
距離頂部 : top : 5px;
liehuo.net
距離左邊 : left : 5px; liehuo.net
距離右邊 : right : 5px; veryhuo.com
距離底邊 : bottom : 5px;
以上就是對于一些常用的CSS語法,然而我們在修改模板的時候用得最多的莫非是 margin-top; margin-left; margin-right; align; background : url(tianyi.gif); border-width : 5px; 這幾個平率最高。 liehuo.net
希望這些代碼多多少少對各位站長朋友們帶來一些幫組,好了,今天的文章就說到這里。不懂的還是自己多動手百度百度。本文來自多彩網 http://www.deluxmart.com,如要轉載文章,請保留網址鏈接,謝謝!如果你還有什么問題,可以去我的網站給我留言。 liehuo.net