展会信息港展会大全

css教程:CSS伪类 android软件开发教程
来源:互联网   发布日期:2016-03-25 16:35:44   浏览:1763次  

导读:CSSpseudo-classesareusedtoaddspecialeffectstosomeselectors.CSS伪类可用来给一些选择器加上特殊效果。Hyp...

CSS pseudo-classes are used to add special effects to some selectors.

CSS伪类可用来给一些选择器加上特殊效果。

Hyperlink

如何在文档内给超级连接加上不同的颜色

This example demonstrates how to add different colors to a hyperlink in a document.

Examples 实例:

代码如下

复制代码

Source Code to Run []

a:link {color: #FF0000}

a:visited {color: #00FF00}

a:hover {color: #FF00FF}

a:active {color: #0000FF}

This is a link

Note: a:hover MUST come after a:link and a:visited in the CSS definition in order to be effective!!

Note: a:active MUST come after a:hover in the CSS definition in order to be effective!!

[ 可先修改部分代码 再运行查看效果 ]

Hyperlink 2

如何给超级连接加上其他样式

This example demonstrates how to add other styles to hyperlinks.

Examples 实例:

代码如下

复制代码

a.one:link {color: #ff0000}

a.one:visited {color: #0000ff}

a.one:hover {color: #ffcc00}

a.two:link {color: #ff0000}

a.two:visited {color: #0000ff}

a.two:hover {font-size: 150%}

a.three:link {color: #ff0000}

a.three:visited {color: #0000ff}

a.three:hover {background: #66ff66}

a.four:link {color: #ff0000}

a.four:visited {color: #0000ff}

a.four:hover {font-family: monospace}

a.five:link {color: #ff0000; text-decoration: none}

a.five:visited {color: #0000ff; text-decoration: none}

a.five:hover {text-decoration: underline}

Mouse over the links to see them change layout.

This link changes color

This link changes font-size

This link changes background-color

This link changes font-family

This link changes text-decoration

赞助本站

人工智能实验室

相关热词: 开发 编程 android

AiLab云推荐
展开

热门栏目HotCates

Copyright © 2010-2024 AiLab Team. 人工智能实验室 版权所有    关于我们 | 联系我们 | 广告服务 | 公司动态 | 免责声明 | 隐私条款 | 工作机会 | 展会港