博客
关于我
伪类选择器
阅读量:562 次
发布时间:2019-03-09

本文共 291 字,大约阅读时间需要 1 分钟。

伪类选择器

CSS伪类(Pseudo-class)用于向某些选择器添加特殊的效果。

使用伪类选择器的语法如下: selector:pseudo-class {property:value;} 常用的CSS伪类见表3-1。书写时尽量不要颠倒

下面的代码给出了伪类用于超链接的显式效果,在不同的状态下超链接的颜色不同。       这是一个由伪类装饰的超链接    

与伪类相似,伪元素(Pseudo element)也用于向某些选择器添加特殊的效果。常用的CSS伪元素见表3-2。

 

nth-child(n),,匹配属于其父元素的第N个子元素,不论元素的类型even 偶数 odd奇数

你可能感兴趣的文章
nnU-Net 终极指南
查看>>
No 'Access-Control-Allow-Origin' header is present on the requested resource.
查看>>
No 'Access-Control-Allow-Origin' header is present on the requested resource.
查看>>
NO 157 去掉禅道访问地址中的zentao
查看>>
no available service ‘default‘ found, please make sure registry config corre seata
查看>>
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
查看>>
no connection could be made because the target machine actively refused it.问题解决
查看>>
No Datastore Session bound to thread, and configuration does not allow creation of non-transactional
查看>>
No fallbackFactory instance of type class com.ruoyi---SpringCloud Alibaba_若依微服务框架改造---工作笔记005
查看>>
No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalanc
查看>>
No mapping found for HTTP request with URI [/...] in DispatcherServlet with name ...的解决方法
查看>>