六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 141|回复: 0

用CSS3设置mailto:像网页中使用css一样

[复制链接]

升级  17.33%

74

主题

74

主题

74

主题

举人

Rank: 3Rank: 3

积分
252
 楼主| 发表于 2013-1-24 06:39:50 | 显示全部楼层 |阅读模式
下例显示了你可以怎样设计mailto:超链接的网页使用CSS属性选择器。
 
 
<!DOCTYPE html><html><head>    <style type="text/css">        a[href^='mailto:'] {            color: green;        }        a[href^='mailto:']:before {            color: red;            content: "Email: ";            font-style: italic;        }    </style></head><body>     <a href="http://cfexamples.com/">Go to ColdFusionExamples.com</a><br/>    <a href="mailto:jane@doe.com">Jane Doe</a><br/>    <a href="mailto:john.smith@domain.org">John Smith</a><br/> </body></html> 
  源代码:
 
  stylemailto.zip
 
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表