css 可以繼承的屬性

2021-10-06 22:44:19 字數 1731 閱讀 9465

1、字型系列屬性

font:組合字型

font-family:規定元素的字型系列

font-weight:設定字型的粗細

font-size:設定字型的尺寸

font-style:定義字型的風格

font-variant:設定小型大寫字母的字型顯示文字,這意味著所有的小寫字母均會被轉換為

大寫,但是所有使用小型大寫字型的字母與其餘文字相比,其字型尺寸更小。

font-stretch:允許你使文字變寬或變窄。所有主流瀏覽器都不支援。

font-size-adjust:為某個元素規定乙個 aspect 值,字型的小寫字母 "x" 的高度與

"font-size" 高度之間的比率被稱為乙個字型的 aspect 值。這

樣就可以保持首選字型的 x-height。

2、文字系列屬性

text-indent:文字縮排

text-align:文字水平對齊

line-height:行高

word-spacing:增加或減少單詞間的空白(即字間隔)

letter-spacing:增加或減少字元間的空白(字元間距)

text-transform:控制文字大小寫

direction:規定文字的書寫方向

color:文字顏色

3、元素可見性:visibility

4、**布局屬性:caption-side、border-collapse、border-spacing、

empty-cells、table-layout

5、列表屬性:list-style-type、list-style-image、list-style-position、list-style

6、生成內容屬性:quotes

7、游標屬性:cursor

8、頁面樣式屬性:page、page-break-inside、windows、orphans

9、聲音樣式屬性:speak、speak-punctuation、speak-numeral、speak-header、

speech-rate、volume、voice-family、pitch、pitch-range、

stress、richness、、azimuth、elevation

1、元素可見性:visibility、opacity        2、游標屬性:cursor

1、字型系列屬性        2、除text-indent、text-align之外的文字系列屬性

1、text-indent、text-align

1、display

2、文字屬性:vertical-align:

text-decoration:

text-shadow:

white-space:

unicode-bidi:

3、盒子模型的屬性:寬度、高度、內外邊距、邊框等

5、定位屬性:浮動、清除浮動、定位position等

6、生成內容屬性:content、counter-reset、counter-increment

7、輪廓樣式屬性:outline-style、outline-width、outline-color、outline

8、頁面樣式屬性:size、page-break-before、page-break-after

繼承中比較特殊的幾點

1、a 標籤的字型顏色不能被繼承

1、h1-h6標籤字型的大下也是不能被繼承的

因為它們都有乙個預設值

css那些屬性可以繼承

1 字型系列屬性 font family 字型系列 font weight 字型的粗細 font size 字型的大小 font style 字型的風格 2 文字系列屬性 text indent 文字縮排 text align 文字水平對齊 line height 行高 word spacing 單...

CSS常見可以繼承的屬性

個人總結的,雖然不全,但是常見 font family 字型系列 font weight 字型的粗細 font size 字型的大小 font style 字型的風格 text indent 文字縮排 text align 文字水平對齊 line height 行高 word spacing 單詞之...

CSS可以被繼承的屬性

color 顏色,a元素除外 font 字型 font family 字型系列 font size 字型大小 font style 用於設定斜體 font weight 用於設定粗體 line height 行高 letter spacing 字母間距 word spacing 字間距 visibi...