我想保持文本的位置但是当在div上盘旋时,文本会停止
HTML
<!DOCTYPE html>
<html>
<head>
<link href="site.css" rel="stylesheet" type="text/css" media="screen"/>
</head>
<body>
<div></div>
<p>hover over the div element above, and the text goes down</p>
</body>
</html>
CSS
div {
width: 100px;
height: 100px;
background: red;
-webkit-transition: height 1s;
}
div:hover {
height: 300px;
}
答案 0 :(得分:2)
答案 1 :(得分:1)