在上一篇文章中,提到了一些修改網(wǎng)站模板中常用到的方法,工具。但其中也牽涉到不到關(guān)于CSS樣式表的一些知識(shí),對(duì)于這些知識(shí),缺乏的還占大多數(shù),今天我就將常用的一些CSS樣式表語(yǔ)法整理一下,發(fā)出來給大家,希望對(duì)各位站長(zhǎng)朋友修改網(wǎng)站模板的時(shí)候有一些幫助。如果你還沒閱讀過上一篇文章,請(qǐng)先移步至《關(guān)于淘客模板修改的一些心得總結(jié)》。
liehuo.net
CSS樣式表的出現(xiàn)就是為了規(guī)范網(wǎng)頁(yè)結(jié)構(gòu),網(wǎng)頁(yè)中的所有框架,無(wú)一例外的都通過CSS樣式表來定義其樣式,大小、位置,邊框位置等……詳見下表: veryhuo.com
邊框?qū)挾?: border-width : 5px; /網(wǎng)
上邊寬度 : 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;
/網(wǎng)
左邊樣式 : 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
溢出選項(xiàng) : overflow : visible; 可替換 hidden; scroll; auto;
liehuo.net
內(nèi)側(cè)邊距 : padding : 5px;
上內(nèi)邊距 : padding-top : 5px;
veryhuo.com
外側(cè)邊距 : margin : 5px;
上外邊距 : margin-top : 5px; veryhuo.com
文字字體 : font-family : fantasy; liehuo.net
文字大小 : font-size : 12pt; liehuo.net
文字粗細(xì) : font-weight : bold; /網(wǎng)
文字樣式 : font-style : italic;
文字變量 : line-height : 110%; liehuo.net
清除屬性 : clear : left; 可替換 right; both; none;
網(wǎng)
浮動(dòng)屬性 : 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
文本縮進(jìn) : text-indent : 5em; liehuo.net
文字間距 : letter-spacing : 5px;
veryhuo.com
字母間距 : word-spacing : 5px; -網(wǎng)
文本轉(zhuǎn)換 : text-transform : capitalize; 可替換 lowercase; uppercase;
/網(wǎng)
垂直排列 : 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; -網(wǎng)
顯示屬性 : display : none; 可替換 block; inline; run-in; compact; list-item; marker; &網(wǎng)
是否可見 : visibility : visible; 可替換 hidden; liehuo.net
資源定位 : position : static; 可替換 relative; absolute; fixed;
距離頂部 : top : 5px;
liehuo.net
距離左邊 : left : 5px; liehuo.net
距離右邊 : right : 5px; veryhuo.com
距離底邊 : bottom : 5px;
以上就是對(duì)于一些常用的CSS語(yǔ)法,然而我們?cè)谛薷哪0宓臅r(shí)候用得最多的莫非是 margin-top; margin-left; margin-right; align; background : url(tianyi.gif); border-width : 5px; 這幾個(gè)平率最高。 liehuo.net
希望這些代碼多多少少對(duì)各位站長(zhǎng)朋友們帶來一些幫組,好了,今天的文章就說到這里。不懂的還是自己多動(dòng)手百度百度。本文來自多彩網(wǎng) http://www.deluxmart.com,如要轉(zhuǎn)載文章,請(qǐng)保留網(wǎng)址鏈接,謝謝!如果你還有什么問題,可以去我的網(wǎng)站給我留言。 liehuo.net