dw css+div 怎么让一个区块向上移动

如题所述

第1个回答  2017-12-02
<!DOCTYPE html>
<html>
<head>
<style>
div{
width:100px;
height:100px;
position:absolute;
}

#df
{
background-color:red;
animation:mymove 1s infinite;
-webkit-animation:mymove 1s infinite;
}

@keyframes mymove
{
from {top:200px;}
to {top:0px;}
}

</style>
</head>
<body>

<div id="df"></div>

</body>
</html>本回答被网友采纳
第2个回答  2019-11-17
浮动:float:left