width.png
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>skew</title>
<style type="text/css">
div{
width:300px;
height: 200px;
background: -webkit-linear-gradient(left,orange 30%,red 100%);
margin: 50px;
}
div:nth-child(2){
background: #fff;
border:1px solid orange;
}
div:hover{
/* width: 500px;
height: 400px;
*/
/*transform: translate(300px);*/
border-color:#ccc;
}
/*过渡绝对不能写在hover里面*/
div:nth-child(2){
transition-property:all;
transition-duration:0.8s;
transition-timing-function:ease-in-out;
transition-delay:0s;
}
</style>
</head>
<body>
<div></div>
<div></div>
</body>
</html>
网友评论