61,111
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style>
.box {
position: relative;
width: 300px;
height: 100px;
border: 10px solid red;
box-sizing: border-box;
}
.item2 {
position: absolute;
right: -10px;
bottom: -10px;
width: 0px;
height: 0px;
box-sizing: border-box;
border: 10px solid transparent;
}
.box:hover .item2 {
box-sizing: border-box;
width: 300px;
height: 100px;
border-color: black;
transition: all 1s;
}
</style>
</head>
<body>
<div class="box">
<div class="item2"></div>
</div>
</body>
</html>