Home > Web Front-end > HTML Tutorial > CSS基础学习九:伪类_html/css_WEB-ITnose

CSS基础学习九:伪类_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:33:42
Original
1129 people have browsed it

        CSS伪类 

        CSS语法中伪类用于向某些选择器添加特殊的效果。常见的伪类有:


        (1)语法

        伪类的语法:

        selector : pseudo-class {property: value}

        CSS 类也可与伪类搭配使用。

        selector.class : pseudo-class {property: value}

        (2)锚伪类
       在支持 CSS 的浏览器中,链接的不同状态都可以不同的方式显示,这些状态包括:活动状态,已被访问状态,未被访问状态,和鼠标悬停状态。

a:link {color: #FF0000}		/* 未访问的链接 */a:visited {color: #00FF00}	/* 已访问的链接 */a:hover {color: #FF00FF}	/* 鼠标移动到链接上 */a:active {color: #0000FF}	/* 选定的链接 */
Copy after login
       完整的代码为:

<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title></title>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template