<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style type="text/css">
a[href^="http:"] {
background: url(images/0335.png) no-repeat left center;
}
a[href$="pdf"] {
background: url(images/0335.png) no-repeat left center;
}
a[href$="png"] {
background: url(images/0410.png) no-repeat left center;
}
</style>
</head>
<body>
<h1>超链接类型识别</h1>
<p><a href="http://www.baidu.com/name.pdf">PDF文件</a></p>
<p><a href="http://www.baidu.com/name.png">PNG文件</a></p>
<p><a href="http://www.baidu.com/name.ppt">PPT文件</a></p>
</body>
</html>
【CSS实战】超链接类型标识图标
于 2023-07-07 12:48:34 首次发布