京东商品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>
效果图:
“我相当乐意花一天的时间通过编程把一个任务实现自动化,除非这个任务手动只需要10秒钟就能完成”