css中的伪类是什么意思?伪类其实就是指伪类选择器,css中的伪类有很多,例如:active、:any-link、:blank:、checked等等,下面我们就详细了解一下css中的伪类。 伪类选择器(简称:伪类)通过冒号来定义,它定义了元素的状态,如点击按下,点击完成等,通过伪类可以为元素的状态修改样式。CSS伪类是用来添加一些选择器的特殊效果。 css中的伪类列表 常用的伪类及其分类 1、动态伪类选择器 不同的状态,使用不同的样式。 2、目标伪类选择器 用来匹配页面的URI中某个标识符的目标元素。 选择匹配E的所有元素,且匹配元素被相关URL指向。 3、语言伪类选择器 用来匹配使用指定语言的元素。 4、元素状态伪类选择器 当元素处于某种状态下时,才起作用,在默认状态下不起作用。 eg: eg: eg: 5、结构伪类选择器 这个就比较多了,平时用的也比较频繁。 6、否定伪类选择器 关于CSS中的伪类的内容就分享到这了,希望本文对大家学习CSS有帮助,想要了解更多CSS伪类的内容,请关注群英网络其它相关文章。
:active
:any-link
:blank
:checked
:current
:default
:defined
:dir()
:disabled
:drop
:empty
:enabled
:first
:first-child
:first-of-type
:fullscreen
:future
:focus
:focus-visible
:focus-within
:has()
:host
:host()
:host-context()
:hover
:indeterminate
:in-range:invalid
:is()
:lang()
:last-child
:last-of-type
:left
:link
:local-link
:not()
:nth-child()
:nth-col()
:nth-last-child()
:nth-last-col()
:nth-last-of-type()
:nth-of-type()
:only-child
:only-of-type
:optional
:out-of-range
:past
:placeholder-shown
:read-only
:read-write
:required
:right
:root
:scope
:target
:target-within
:user-invalid
:valid
:visited
:where()
E:link
E:visited
E:active
E:hover
E:focus
E:target
E:lang(language)
E:checked
input[type="checkbox"]:checked{}
E:enabled
input[type="text"]:checked{}
E:disabled
input[type="text"]:disabled{}
:nth-child
:nth-last-child
:nth-of-type
:nth-last-of-type
:first-child
:last-child
:only-child
:first-of-type
:last-of-type
:only-of-type
:root
匹配元素所有在文档的根元素:empty
选择没有子元素的元素,且不包含节点
E:not(F)
匹配所有除F外的E元素
Copyright © QY Network Company Ltd. All Rights Reserved. 2003-2018 群英 版权所有 茂名市群英网络有限公司
增值电信经营许可证 : B1.B2-20140078 粤ICP备09006778号-36 粤公网安备 44090202000006号 粤工商备P091701000595