<!DOCTYPE HTML>
<html lang="en-US">
<head>
<title>css实现鼠标悬停时图片加边框效果</title>
<style type="text/css">
.demo{background:white;margin:0 5px;width:170px;height:170px;}
.demo:hover{border:1px red solid;}
.demo:hover{width:166px;height:166px;border:2px solid #D94600;}
</style>
</head>
<body>
<div class="demo">
<p><img src="/jscss/demoimg/wall_s6.jpg" /></p>
<p>asdasd</p>
<p>asdasd</p>
<p>defrwer</p>
</div>
</body>
</html>
CSS鼠标悬停div加边框效果
最新推荐文章于 2024-04-24 00:31:09 发布