亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

html5 canvas寫一個圖片圍繞圖片中心一直旋轉的代碼,用translate和rotate方法

html5 canvas寫一個圖片圍繞圖片中心一直旋轉的代碼,用translate和rotate方法

元芳怎么了 2019-04-02 05:00:06
html5 canvas寫一個圖片圍繞圖片中心一直旋轉的代碼,用translate和rotate方法 
查看完整描述

4 回答

?
慕森王

TA貢獻1777條經驗 獲得超3個贊

你只要將div換成img就行了
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
div{
width: 200px;
height: 200px;
background: yellow;
animation:myfirst 5s linear 2s infinite alternate;
-webkit-animation:myfirst 5s linear 0s infinite normal;
-moz-animation: myfirst 5s linear 0s infinite normal;
-o-animation: myfirst 5s linear 0s infinite normal;
}

@keyframes myfirst{
0%{
transform: rotate(0deg);
}
100%{
transform: rotate(360deg);
}
}
</style>
</head>
<body>
<div style=""></div>
</body>
</html>


 


查看完整回答
反對 回復 2019-04-03
  • 4 回答
  • 0 關注
  • 700 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號