css构造超链接

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
	<head>
		<title>css构造超链接</title>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
		<style type = "text/css">
			a
			{
				/*IE6 IE7不显示下划虚线*/
				text-decoration:none;
				color:red;
				border-bottom:1px dashed #333;
				
				display:block;
				width:140px;
				line-height:150%;
			}
			
		</style>
	</head>
	
	<body>
		<!-- 给链接加上边框 -->
		<a href = "http://www.php100.com">PHP100.COM中文网</a>
		
	</body>
</html>  

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
	<head>
		<title>css构造超链接</title>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
		<style type = "text/css">
			a
			{
				
				border:1px solid #333;
				background:#ccc;
				text-decoration:none;
				color:#f00;
				/*IE7上下边框显示不出来*/
				line-height:150%;
			}
			
		</style>
	</head>
	
	<body>
		<!-- 在文章段落中加上超链接 -->
		<p>PHP100.COM中文网,<a href = "http://www.php100.com">PHP</a>中文共享站<p>
		
	</body>
</html>  

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
	<head>
		<title>css构造超链接</title>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
		<style type = "text/css">
			a
			{
				
				background:url(tb.gif) no-repeat left center;
				text-decoration:none;
				color:#f00;
				line-height:150%;
				padding-left:15px;
			}
			a:hover
			{
				background:url(tk.gif) no-repeat left center;
			}
			
		</style>
	</head>
	
	<body>
		<!-- 用背景图像添加记号 -->
		<p>PHP100.COM中文网,<a href = "http://www.php200.com">PHP</a>中文共享站<p>
		
	</body>
</html>  

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
	<head>
		<title>css构造超链接</title>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
		<style type = "text/css">
			a:link,a:visited,a:active,a:hover
			{
				
				background:url(tb.gif) no-repeat left center;
				text-decoration:none;
				color:#f00;
				line-height:150%;
				padding-left:15px;
			}
			a:hover
			{
				background:url(tk.gif) no-repeat left center;
			}
			
		</style>
	</head>
	
	<body>
		<!-- 利用派生来影响链接 -->
		<p>PHP100.COM中文网,<a href = "http://www.php200.com">PHP</a>中文共享站<p>
		
	</body>
</html>  

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
	<head>
		<title>css构造超链接</title>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
		<style type = "text/css">
			a
			{
				
				background:url(underline1.gif) repeat-x left bottom;
				text-decoration:none;
				line-height:150%;
			}
			a:hover
			{
				background:url(underline1-hover.gif) repeat-x left bottom;
			}
			
		</style>
	</head>
	
	<body>
		<!-- 利用派生来影响链接 -->
		<p>PHP100.COM中文网,<a href = "http://www.php200.com">PHP</a>中文共享站<p>
		
	</body>
</html>  

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
	<head>
		<title>css构造超链接</title>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
		<style type = "text/css">
			a
			{
				color:red;
			}
			a:hover
			{
				color:blue;
			}
			
			.ex
			{
				color:green;
				background:url(tk.gif) no-repeat left center;
				padding:10px;
			}
			
		</style>
	</head>
	
	<body>
		<!-- 突出显示不同类型的链接 -->
		<p>PHP100.COM中文网,<a href = "http://www.php100.com">PHP</a>中文共享站!<a href = "http://www.php200.com" class = "ex">论坛</a><p>
		
	</body>
</html>  

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
	<head>
		<title>css构造超链接</title>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
		<style type = "text/css">
			a[href ^= "http:"]
			{
				background:url(tb.gif) no-repeat left center;
				padding-left:10px;
				color:red;
			}
			a[href ^= "mailto:"]
			{
				background:url(tk.gif) no-repeat left top;
				padding-left:15px;
				padding-top:5px;
				color:green;
			}
			
		</style>
	</head>
	
	<body>
		<!-- 使用属性选择器来做链接 -->
		<p>PHP100.COM中文网,<a href = "http://www.php100.com">PHP</a>中文共享站!<a href = "mailto:1555322@qq.com">邮件</a><a href = "http://www.php200.com" class = "ex">论坛</a><p>
		
	</body>
</html>  


 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
	<head>
		<title>css构造超链接</title>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
		<style type = "text/css">
			a
			{
				display:block;
				width:160px;
				height:25px;
				line-height:25px;
				text-align:center;
				background:1px solid black;
				color:lightgreen;
				font-size:12px;
				text-decoration:none;
				background:#06f;
			}
			a:hover
			{
				background:#f60;
				color:#fff;
			}
			
		</style>
	</head>
	
	<body>
		<!-- 创建按钮和翻转 -->
		<a href = "http://www.php100.com">PHP100.COM中文网</a>
		
	</body>
</html>  


 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
	<head>
		<title>css构造超链接</title>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
		<style type = "text/css">
			a
			{
				display:block;
				width:200px;
				height:40px;
				line-height:40px;
				text-align:center;
				background:1px solid black;
				color:lightgreen;
				font-size:12px;
				text-decoration:none;
				background:url(button.gif) no-repeat;
			}
			a:hover
			{
				background:url(button-over.gif) no-repeat;
				color:#fff;
			}
			
		</style>
	</head>
	
	<body>
		<!-- 具有图像的翻转 -->
		<a href = "http://www.php100.com">PHP100.COM中文网</a>
		
	</body>
</html>  


 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
	<head>
		<title>css构造超链接</title>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
		<style type = "text/css">
			ul
			{
				list-style-type:none;
			}
			ul li
			{
				height:25px;
			}
			ul li a
			{
				width:160px;
				height:30px;
				line-height:30px;
				display:block;
				background:url(tb.gif) no-repeat left center;
				padding-left:30px;
				color:red;
			}
			ul li a:hover
			{
				color:maroon;
				background:url(tk.gif) no-repeat left center;
			}
			
		</style>
	</head>
	
	<body>
		<!-- 以访问连接样式 -->
		<a href = "http://www.php100.com">PHP100.COM中文网</a>
		<ul>
			<li><a href = "http://www.aaa.com">AAAAA</a></li>
			<li><a href = "http://www.bbb.com">BBBBB</a></li>
			<li><a href = "http://www.ccc.com">CCCCC</a></li>
			<li><a href = "http://www.ddd.com">DDDDD</a></li>
			<li><a href = "http://www.eee.com">EEEEE</a></li>
		</ul>
	</body>
</html>  

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
	<head>
		<title>css构造超链接</title>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
		<style type = "text/css">
			body
			{
				margin:100px;
				
			}
			p a
			{
				position:relative
			}
			
			p a span
			{
				display:none;
			}
			p a:hover span 
			{
				display:block;
				border:1px solid black;
				width:150px;
				height:100px;
				background:lightyellow;
				position:absolute;
				top:15px;
				left:0px;
			}
			/*解决IE5.5 IE6无效问题 一个BUG*/
			p a:hover
			{
				font-size:100%;
			}
		</style>
	</head>
	
	<body>
		<!-- 纯CSS工具提示 -->
		<p><a href = "http://www.php100.com">PHP<span>PHP官方网站<br /><img src = "1.jpg"></span></a>100.COM中文网</p>
	</body>
</html>  



 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值