京东商品hover效果

代码:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
div{
width:300px;
height:145px;
position:relative;
border:3px solid #eee;
}
div:hover {
border:3px solid red;
}
div:before {
content: "";
position:absolute;
border:1px solid #ff794f;
top:8px;
bottom:8px;
left:8px;
right:8px;
transform: scale(0,1);
transition: transform 0.5s;
}
div:hover:before{
border:1px solid red;
transform: scale(1);
transition: transform 0.5s;

}
</style>
</head>
<body>
<div></div>
</body>
</html>

效果图:

 
posted @ 2016-11-10 10:29  ypm_wbg  阅读(245)  评论(0编辑  收藏  举报