description |
---|
CSS 的介绍以及 LCUI 对 CSS 特性的支持情况。 |
层叠样式表 (Cascading Style Sheets,缩写为 CSS),是一种用来为结构化文档(如 HTML 文档或 XML 应用)添加样式(字体、间距和颜色等)的语言。CSS 使我们可以将 UI 中的显示信息隔离出来,存放在用 CSS 语言写的文件中,从而简化 UI 的代码,使其只包含结构和内容的描述代码。
出于开发成本的考虑,LCUI 内置的 CSS 解析器仅支持一些常用的 CSS 特性,你可以从以下列表来了解 CSS 特性支持情况,已勾选的是表示已支持(至少支持基本功能),未列出的属性则默认不支持。
- at rules
-
@font-face
-
@keyframes
-
@media
-
- keywords
-
!important
-
- selectors
-
*
-
type
-
#id
-
.class
-
:hover
-
:focus
-
:active
-
:first-child
-
:last-child
-
[attr="value"]
-
:not()
-
:nth-child()
-
parent > child
-
a ~ b
-
::after
-
::before
- ...
-
- units
- px
- dp
- sp
- pt
- %
- rem
- vh
- vw
- properties
- top, right, bottom, left
- width, height
- visibility
- display
- none
- inline-block
- block
- flex
- inline-flex
- inline
- grid
- table
- table-cell
- table-row
- table-column
- ...
- position
- static
- relative
- absolute
- fixed
- box-sizing
- border-box
- content-box
- border
- border-radius
- background-color
- background-image
- background-position
- background-cover
- background
- pointer-events
- font-face
- font-family
- font-size
- font-style
- flex
- flex-shrink
- flex-grow
- flex-basis
- flex-wrap
- flex-direction
- justify-content
- flex-start
- center
- flex-end
- align-items
- flex-start
- center
- flex-end
- stretch
- float
- transition
- transform
- ...