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

下例显示了你可以怎样设计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:[email protected]">Jane Doe</a><br/>
    <a href="mailto:[email protected]">John Smith</a><br/>
 
</body>
</html>

 

  源代码:

 

  stylemailto.zip

 

你可能感兴趣的:(html5,css3)