前端学习(64):css继承属性小结
? ? 今天來(lái)總結(jié)一點(diǎn)關(guān)于css中哪些屬性可以被繼承,哪些不可以被繼承。不是很全,僅供大家參考,也方便于自己以后復(fù)習(xí)。
一、不能被繼承的屬性
1、display:規(guī)定元素應(yīng)該生成的框的類(lèi)型
2、文本屬性:?
? ? ? ?vertical-align、 text-decoration、text-shadow 等
3、盒子模型的屬性:
? ? ? ?width、height、margin 、border、border-style、padding 等
4、背景屬性:
? ?????background、background-color、background-image、background-repeat、background-position、background-attachment 等
5、定位屬性:
? ? ? ?float、clear、position、top、left、right、bottom、overflow、z-index 等
?
二、能被繼承的屬性
1、字體系列屬性
????????font、font-family、font-weight、font-size、font-style 等
2、文本系列屬性
????????text-indent、?color、text-align、line-height、word-spacing 等
3、元素可見(jiàn)性:visibility
4、光標(biāo)屬性:cursor
5、列表布局屬性:list-style
?
總結(jié)
以上是生活随笔為你收集整理的前端学习(64):css继承属性小结的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: ux的重要性_颜色在UX中的重要性
- 下一篇: element-ui表单_每日UI挑战强