css常用标签总结
目錄一 、CSS文字屬性:二、CSS邊框空白三、CSS符號(hào)屬性:四、CSS背景樣式:指定背景位置五、CSS連接屬性:鼠標(biāo)光標(biāo)樣式:六、CSS框線一覽表:其他框線樣式七、CSS邊界樣式:另外,CSS 屬性:字體樣式(Font Style)文本樣式(Text Style)背景樣式框架樣式(Box Style)分類列表
CSS也是我們常叫的樣式表、通俗叫切圖和靜態(tài)網(wǎng)頁(yè)布局。我們知道HTML網(wǎng)頁(yè)是由若干標(biāo)簽和內(nèi)容組成。標(biāo)簽包括了div標(biāo)簽、span標(biāo)簽、a錨文本標(biāo)簽、strong加粗標(biāo)簽、b加粗標(biāo)簽、p段落標(biāo)簽、br換行標(biāo)簽等組成。而外表生龍活虎漂亮的網(wǎng)頁(yè)樣式卻是CSS控制得出。一個(gè)完整漂亮網(wǎng)頁(yè),就是由html標(biāo)簽與控制這些標(biāo)簽布局和美化功能CSS組成。
CSS可以讓網(wǎng)頁(yè)“穿上漂亮衣服”,CSS可以控制HTML標(biāo)簽對(duì)象的css 寬度、css 高度、float浮動(dòng)、文字大小、字體、css背景等樣式達(dá)到我們想要的布局效果。CSS功能和作用也就在于此。開發(fā)中我們往往會(huì)用到一些css屬性,由于css的樣式多的數(shù)不勝數(shù),每次使用的時(shí)候都要在網(wǎng)上臨時(shí)查找,經(jīng)過(guò)多次使用,日積月累總結(jié)了一些我們開發(fā)中常用的css標(biāo)簽,以備開發(fā)中使用。
一 、CSS文字屬性:
color : #999999;
font-family : 宋體,sans-serif;
font-size : 9pt;
font-style:itelic;
font-variant:small-caps;
letter-spacing : 1pt;
line-height : 200%;
font-weight:bold;
vertical-align:sub;
vertical-align:super;
text-decoration:line-through;
text-decoration: overline;
text-decoration:underline;
text-decoration:none;
text-transform : capitalize;
text-transform : uppercase;
text-transform : lowercase;
text-align:right;
text-align:left;
text-align:center;
text-align:justify;
vertical-align屬性
vertical-align:top;
vertical-align:bottom;
vertical-align:middle;
vertical-align:text-top;
vertical-align:text-bottom;
二、CSS邊框空白
padding-top:10px;
padding-right:10px;
padding-bottom:10px;
padding-left:10px;
三、CSS符號(hào)屬性:
list-style-type:none;
list-style-type:decimal;
list-style-type:lower-roman;
list-style-type:upper-roman;
list-style-type:lower-alpha;
list-style-type:upper-alpha;
list-style-type:disc;
list-style-type:circle;
list-style-type:square;
list-style-image:url(/dot.gif);
list-style-position: outside;
list-style-position:inside;
四、CSS背景樣式:
background-color:#F5E2EC;
background:transparent;
background-image : url(/image/bg.gif);
background-attachment : fixed;
background-repeat : repeat;
background-repeat : no-repeat;
background-repeat : repeat-x;
background-repeat : repeat-y;
指定背景位置
background-position : 90% 90%;
background-position : top;
background-position : buttom;
background-position : left;
background-position : right;
background-position : center;
五、CSS連接屬性:
A
a:link
a:visited
a:active
a:hover
鼠標(biāo)光標(biāo)樣式:
鏈接手指 CURSOR: hand
十字體 cursor:crosshair
箭頭朝下 cursor:s-resize
十字箭頭 cursor:move
箭頭朝右 cursor:move
加一問(wèn)號(hào) cursor:help
箭頭朝左 cursor:w-resize
箭頭朝上 cursor:n-resize
箭頭朝右上 cursor:ne-resize
箭頭朝左上 cursor:nw-resize
文字I型 cursor:text
箭頭斜右下 cursor:se-resize
箭頭斜左下 cursor:sw-resize
漏斗 cursor:wait
光標(biāo)圖案(IE6) p {cursor:url("光標(biāo)文件名.cur"),text;}
六、CSS框線一覽表:
border-top : 1px solid #6699cc;
border-bottom : 1px solid #6699cc;
border-left : 1px solid #6699cc;
border-right : 1px solid #6699cc;
以上是建議書寫方式,但也可以使用常規(guī)的方式 如下:
border-top-color : #369
border-top-width :1px
border-top-style : solid
其他框線樣式
Solid
Dotted
Double
Groove
Ridge
Inset
Outset
七、CSS邊界樣式:
margin-top:10px;
margin-right:10px;
margin-bottom:10px;
margin-left:10px;
另外,CSS 屬性:
字體樣式(Font Style)
1 字體樣式 {font:font-style font-variant font-weight font-size font-family}
2 字體類型 {font-family:"字體1","字體2","字體3",...}
3 字體大小 {font-size:數(shù)值|inherit| medium| large| larger| x-large| xx-large| small| smaller| x-small| xx-small}
4 字體風(fēng)格 {font-style:inherit|italic|normal|oblique}
5 字體粗細(xì) {font-weight:100-900|bold|bolder|lighter|normal;}
6 字體顏色 {color:數(shù)值;}
7 陰影顏色 {text-shadow:16位色值}
8 字體行高 {line-height:數(shù)值|inherit|normal;}
9 字 間 距 {letter-spacing:數(shù)值|inherit|normal}
10 單詞間距 {word-spacing:數(shù)值|inherit|normal}
11 字體變形 {font-variant:inherit|normal|small-cps }
12 英文轉(zhuǎn)換 {text-transform:inherit|none|capitalize|uppercase|lowercase}
13 字體變形 {font-size-adjust:inherit|none}
14 字體 {font-stretch:condensed|expanded|extra-condensed|extra-expanded|inherit|narrower|normal| semi-condensed|semi-expanded|ultra-condensed|ultra-expanded|wider}
文本樣式(Text Style)
1 行 間 距 {line-height:數(shù)值|inherit|normal;}
2 文本修飾 {text-decoration:inherit|none|underline|overline|line-through|blink}
3 段首空格 {text-indent:數(shù)值|inherit}
4 水平對(duì)齊 {text-align:left|right|center|justify}
5 垂直對(duì)齊 {vertical-align:inherit|top|bottom|text-top|text-bottom|baseline|middle|sub|super}
6 書寫方式 {writing-mode:lr-tb|tb-rl}
背景樣式
1 背景顏色 {background-color:數(shù)值}
2 背景圖片 {background-image: url(URL)|none}
3 背景重復(fù) {background-repeat:inherit|no-repeat|repeat|repeat-x|repeat-y}
4 背景固定 {background-attachment:fixed|scroll}
5 背景定位 {background-position:數(shù)值|top|bottom|left|right|center}
6 背影樣式 {background:背景顏色|背景圖象|背景重復(fù)|背景附件|背景位置}
框架樣式(Box Style)
1 邊界留白 {margin:margin-top margin-right margin-bottom margin-left}
2 補(bǔ) 白 {padding:padding-top padding-right padding-bottom padding-left}
3 邊框?qū)挾?{border-border-top-width border-right-width border-bottom-width border-left-width}
寬度值: thin|medium|thick|數(shù)值
4 邊框顏色 {border-color:數(shù)值 數(shù)值 數(shù)值數(shù)值} 數(shù)值:分別代表top、right、bottom、left顏色值
5 邊框風(fēng)格 {border-style:none|hidden|inherit|dashed|solid|double|inset|outset|ridge|groove}
6 邊 框 {border:border-width border-style color}
上 邊 框 {border-top:border-top-width border-style color}
右 邊 框 {border-right:border-right-width border-style color}
下 邊 框 {border-bottom:border-bottom-width border-style color}
左 邊 框 {border-left:border-left-width border-style color}
7 寬 度 {長(zhǎng)度|百分比| auto}
8 高 度 {height:數(shù)值|auto}
9 漂 浮 {float:left|right|none}
10 清 除 {clear:none|left|right|both}
分類列表
1 控制顯示 {display:none|block|inline|list-item}
2 控制空白 {white-space:normal|pre|nowarp}
3 符號(hào)列表 {list-style-type:disc|circle|square|decimal|lower-roman|upper-roman|lower-alpha|upper-alpha|none}
4 圖形列表 {list-style-image:URL}
5 位置列表 {list-style-position:inside|outside}
6 目錄列表 {list-style:目錄樣式類型|目錄樣式位置|url}
7 鼠標(biāo)形狀 {cursor:hand|crosshair|text|wait|move|help|e-resize|nw-resize|w-resize|s-resize|se-resize|sw-resize}
word-wrap是控制換行的。使用break-word時(shí),是將強(qiáng)制換行。中文沒有任何問(wèn)題,英文語(yǔ)句也沒問(wèn)題。但是對(duì)于長(zhǎng)串的英文,就不起作用。break-word是控制是否斷詞的。normal是默認(rèn)情況,英文單詞不被拆開。break-all,是斷開單詞。在單詞到邊界時(shí),下個(gè)字母自動(dòng)到下一行。主要解決了長(zhǎng)串英文的問(wèn)題。keep-all,是指Chinese, Japanese, and Korean不斷詞。即只用此時(shí),不用word-wrap,中文就不會(huì)換行了。(英文語(yǔ)句正常。)ie下:使用word-wrap:break-word;所有的都正常。ff下:如這2個(gè)都不用的話,中文不會(huì)出任何問(wèn)題。英文語(yǔ)句也不會(huì)出問(wèn)題。但是,長(zhǎng)串英文會(huì)出問(wèn)題。為了解決長(zhǎng)串英文,一般用word-wrap:break-word;word-break:break-all;。但是,此方式會(huì)導(dǎo)致,普通的英文語(yǔ)句中的單詞會(huì)被斷開(ie下也是)。目前主要的問(wèn)題存在于長(zhǎng)串英文和英文單詞被斷開。其實(shí)長(zhǎng)串英文就是一個(gè)比較長(zhǎng)的單詞而已。即英文單詞應(yīng)不應(yīng)該被斷開那?那問(wèn)題很明顯了,顯然不應(yīng)該被斷開了。對(duì)于長(zhǎng)串英文,就是惡意的東西,自然不用去管了。但是,也要想些辦法,不讓它把容器撐大。用:overflow:auto; ie下,長(zhǎng)串會(huì)自動(dòng)折行。ff下,長(zhǎng)串會(huì)被遮蓋。所以,綜上,最好的方式是word-wrap:break-word; overflow:hidden;而不是word-wrap:break-word;word-break:break-all;。
總結(jié)
- 上一篇: 000_陆小果哥哥软件更新地址
- 下一篇: Matlab——图形绘制——三维立体图形