下面是循环云的代码,动画由右至左循环,我想作的时候点击,但我不知道该怎么做云计算调整,能...
<!DOCTYPE>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
</head>
<body>
<div id="clouds">
<img border="0" alt="animated clouds" src="clouds.png">
<script>
$(document).ready(function() {
function loop() {
$('#clouds').css({right:0});
$('#clouds').animate ({right: '+=1400'}, 5000, 'linear', function() {
loop();
});
}
loop();
});
</script>
</div>
</body>
</html>
以下是我试过调整云:
$("#clouds").click(function() {
$("size").animate({"height" : "350"}, 500);
});
和CSS:
#clouds {
position:absolute;
z-index:500;
right:0px;
top:10px;
}