首页 > 网站 > WEB开发 > 正文

CSS代码:Hover over下的边框变化

2024-04-27 13:57:13
字体:
来源:转载
供稿:网友
<!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">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/CSS">
p#outer {
  position:relative;
  float:left;
  margin-top:20px;
  margin-left:20px;
  background: blue;
 }
#outer a {
 margin:0;
 background-color:blue;
 display:block;
 position: relative;
  border:2px dashed red;
}
#outer a:hover {border:2px dashed #CCFFCC;}
#outer img {display:block;border:none;background:#ffffcc;padding:4px;}
</style>
</head>
<body>
<h1>Hover over the image to see the double border effect</h1>
<p id="outer"><a href="#"><img src="http://www.vevb.com/images/logo.gif" alt="example image border" width="150" height="86" /></a>
</p>
</body>
</html>
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表