域名注冊 網(wǎng)站制作
您現(xiàn)在的位置:首頁 >> 網(wǎng)站建設(shè) >> 內(nèi)容

DIV屬性

時間:2014/11/18 16:21:18 點(diǎn)擊:214

摘要:標(biāo)準(zhǔn)屬性 id, class, title, style, dir, lang, xml:lang 如需完整的描述,請訪問標(biāo)準(zhǔn)屬性。color : #999999 文字顏色 font-family...

標(biāo)準(zhǔn)屬性

id, class, title, style, dir, lang, xml:lang 如需完整的描述,請訪問標(biāo)準(zhǔn)屬性。

color : #999999 文字顏色

font-family :宋體文字字型

font-size: 10pt 文字大小

font-style:italic 文字斜體

font-variant:small-caps 小字體

letter-spacing: 1pt 文字間距

line-height: 200% 設(shè)定行高

font-weight:bold 文字粗體

vertical-align:sub 下標(biāo)字

vertical-align:super 上標(biāo)字

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 文字置中對齊

這些是一些簡單的文字效果,可以應(yīng)用到css的頁面中。

背景

background-color:black 背景顏色

background-image : url(image/bg.gif) 背景圖片

background-attachment : fixed 固定背景

background-repeat : repeat 重復(fù)排列-網(wǎng)頁預(yù)設(shè)

background-repeat : no-repeat 不重復(fù)排列

background-repeat : repeat-x 在x軸重復(fù)排列

background-repeat : repeat-y 在y軸重復(fù)排列

background-position : 90% 90% 背景圖片x與y軸的位置

鏈接

A 所有超連接

A:link 超連接文字格式

A:visited 瀏覽過的連接文字格式

A:active 按下連接的格式

A:hover 鼠標(biāo)移至連接

邊框

border-top : 1px solid black 上框

border-bottom : 1px solid #6699cc 下框

border-left : 1px solid #6699cc 左框

border-right : 1px solid #6699cc 右框

border: 1px solid #6699cc 四邊框

虛線

<textarea style="border:1px dashed pink">

實(shí)線

<textarea style="border:1px solid pink">

事件屬性

onclick(單擊), ondblclick(雙擊)

onmousedown(鼠標(biāo)按下), onmouseup(鼠標(biāo)抬起), onmousemove(鼠標(biāo)移動)

onmouseover(鼠標(biāo)在div內(nèi)部), onmouseout(鼠標(biāo)移出div),

onkeypress(鍵盤按下), onkeydown(鍵盤按鍵), onkeyup(按鍵抬起)

如需完整的描述,請訪問事件屬性。

可選的屬性

屬性:align

值:left right center justify

描述:不贊成使用。請使用樣式取而代之。規(guī)定 div 元素中的內(nèi)容的對齊方式。

DTD:TF

轉(zhuǎn)載請保留原文地址: http://www.448gfe.cn/show-353.html

責(zé)編:王麗 作者:不詳 來源:網(wǎng)絡(luò)