CSS中常用的屬性

來源:互聯網
上載者:User

標籤:邊框顏色   order   ima   att   lib   roman   cap   文本   需要   

字型屬性

Font-family 字型族科

Font-size  字型大小

Font-style  字型樣式 

Font-weight 字型加粗  normal |bold(加粗)|lighter(變細)

Font-variant 字型變形   normal|small-caps

Font:[字型風格] [字型變形] [字型加粗] <字型大小>[/行高] <字型族科>

顏色屬性

Color

背景屬性

Background-repeat: 背景重複

Repeat-x(x軸方向重複) | repeat-y(y軸方向重複) |no-repeat(不重複)

Background-attachment: 背景附件 scroll(預設值)  fixed(固定)

Background-position:背景位置

Left|center|right( 橫向)

Top|center|bottom(縱向)

像素

注意:background-position 兩個值之間需要使用空格隔開

Background:<背景顏色>|<背景圖片>|<背景重複>|<背景附件>|<背景位置>

每個屬性中間都要用空格隔開

  1. 邊框屬性

border-style 邊框樣式

 

值:

  dotted 點線

  Dashed 虛線

  Solid   實線

  Double 雙實線

  Groove 槽狀線

  Ridge   脊線

  Inset  內嵌效果

  Outset 外凸效果

  Border-width 邊框寬度

  Border-color  邊框顏色

  Border:邊框寬度 邊框樣式 邊框顏色;

文字屬性

Letter-spacing  字母間隔 

Word -spacing  詞間距 

Text-decoration 文本修飾

None(預設值) 通常我們使用這個屬性將a標籤的預設底線取消

Underline 定義文本下的一條線

Overline 定義文本上的一條線

Line-through  定義穿過文本中的一條線

Text-align 對齊

  Justify 將我們的文字貼近我們的邊框 將我們的空白留給中間

Text-indent  文本縮排  2em
line-height 設定行間距離(行高)  

 

  5. 滑鼠游標屬性

Cursor

Text      文本

Crosshair 十字架

Wait     等待

Help     協助

Pointer   小手

6.列表屬性

List-style-type  列表樣式類型

值:

Disc 實心點

Circle 圓圈

Square 小方塊

Decimal  數字

Lower-roman  小寫羅馬字

Upper-roman  大寫羅馬字

Lower-alpha   小寫字母

Upper-alpha   大寫字母

None 沒有標識

List-style-image  列表樣式圖片

url()

List-style-position 列表樣式位置

Inside 表示在li裡面

Outside 表示在li外面(預設值)

 

CSS中常用的屬性

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.