時間:2022-07-24 03:09:01 | 來源:建站知識
時間:2022-07-24 03:09:01 來源:建站知識
在上一篇文章中,提到了一些修改網(wǎng)站模板中常用到的方法,工具。但其中也牽涉到不到關(guān)于CSS樣式表的一些知識,對于這些知識,缺乏的還占大多數(shù),今天我就將常用的一些CSS樣式表語法整理一下,發(fā)出來給大家,希望對各位站長朋友修改網(wǎng)站模板的時候有一些幫助。如果你還沒閱讀過上一篇文章,請先移步至《關(guān)于淘客模板修改的一些心得總結(jié)》。
CSS樣式表的出現(xiàn)就是為了規(guī)范網(wǎng)頁結(jié)構(gòu),網(wǎng)頁中的所有框架,無一例外的都通過CSS樣式表來定義其樣式,大小、位置,邊框位置等……詳見下表:
邊框?qū)挾?: border-width : 5px;
上邊寬度 : border-top-width : 5px;
左邊寬度 : border-left-width : 5px;
右邊寬度 : border-right-width : 5px;
底邊寬度 : border-bottom-width : 5px;
邊框顏色 : border-color : #000000;
上邊顏色 : border-top-color : #000000;
邊框樣式 : border-style : double; 可替換 dashed; dotted; none;
上邊樣式 : border-top-style : solid;
左邊樣式 : border-left-style : inset;
右邊樣式 : border-right-style : ridge;
底邊樣式 : border-bottom-style : solid;
整體寬度 : width : 5px;
整體高度 : height : 5px;
溢出選項 : overflow : visible; 可替換 hidden; scroll; auto;
內(nèi)側(cè)邊距 : padding : 5px;
上內(nèi)邊距 : padding-top : 5px;
外側(cè)邊距 : margin : 5px;
上外邊距 : margin-top : 5px;
文字字體 : font-family : fantasy;
文字大小 : font-size : 12pt;
文字粗細(xì) : font-weight : bold;
文字樣式 : font-style : italic;
文字變量 : line-height : 110%;
清除屬性 : clear : left; 可替換 right; both; none;
浮動屬性 : float : left; 可替換 right; none;
水平排列 : text-align : left; 可替換 right; center; justify;
文本修飾 : text-decoration : underline; 可替換 overline; underline overline; line-through; blink;
文本縮進 : text-indent : 5em;
文字間距 : letter-spacing : 5px;
字母間距 : word-spacing : 5px;
文本轉(zhuǎn)換 : text-transform : capitalize; 可替換 lowercase; uppercase;
垂直排列 : vertical-align : baseline; 可替換 top; middle; bottom; text-top; text-bottom; super; sub; 3em; 30%;
背景圖片 : background-image : url(tianyi.gif);
背景拉伸 : background-repeat : repeat; 可替換 repeat-x; repeat-y; no-repeat;
背景定位 : 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;
資源定位 : position : static; 可替換 relative; absolute; fixed;
距離頂部 : top : 5px;
距離左邊 : left : 5px;
距離右邊 : right : 5px;
距離底邊 : bottom : 5px;
以上就是對于一些常用的CSS語法,然而我們在修改模板的時候用得最多的莫非是 margin-top; margin-left; margin-right; align; background : url(tianyi.gif); border-width : 5px; 這幾個平率最高。
希望這些代碼多多少少對各位站長朋友們帶來一些幫組,好了,今天的文章就說到這里。不懂的還是自己多動手百度百度。本文來自多彩網(wǎng) ,如要轉(zhuǎn)載文章,請保留網(wǎng)址鏈接,謝謝!如果你還有什么問題,可以去我的網(wǎng)站給我留言。
關(guān)鍵詞:模板,修改,中常
微信公眾號
版權(quán)所有? 億企邦 1997-2022 保留一切法律許可權(quán)利。