1
當我把固定的div放在頂部,並用css3使用SetTimeout或動畫時,div會改變他的位置。如何在使用setTimeout或動畫css3時使用Phonegap和固定div?
當滾動div更改位置和下降或向上取決於方向滾動的方向。
<html>
<head>
<script>
cargart();
function cargart(){
setTimeout("cargart()",1000);
document.getElementById("tmap").innerHTML= new Date();
}
</script>
<style>
#menuindex2{
position:fixed;
background-color: #111111;
width:100%;
height:52px;
}
#tmap{
position:absolute;
margin-top:55px;
}
</style>
</head>
<body >
<div id="menuindex2">
div fixed
</div>
<div id="tmap">
</div>
</body>
</html>