伪状态 | 描述 |
:checked | button部件被选中 |
:disabled | 部件被禁用 |
:enabled | 部件被启用 |
:focus | 部件获得焦点 |
:hover | 鼠标位于部件上 |
:indeterminate | checkbox或radiobutton被部分选中 |
:off | 部件可以切换,且处于off状态 |
:on | 部件可以切换,且处于on状态 |
:pressed | 部件被鼠标按下 |
:unchecked | button部件未被选中 |
子部件 | 描述 |
::down-arrow | combo box或spin box的下拉箭头 |
::down-button | spin box的向下按钮 |
::drop-down | combo box的下拉箭头 |
::indicator | checkbox、radio button或可选择group box的指示器 |
::item | menu、menu bar或status bar的子项目 |
::menu-indicator | push button的菜单指示器 |
::title | group box的标题 |
::up-arrow | spin box的向上箭头 |
::up-button | spin box的向上按钮 |
margin与padding区别:
margin是指从自身边框到另一个容器边框之间的距离,就是容器外距离。
在CSS中padding是指自身边框到自身内部另一个容器边框之间的距离,就是容器内距离。