繁体   English   中英

如何围绕一个角色制作动画

[英]how do I make an animations around one character

有没有办法让 animation 围绕一个数字对应于数字量? 就像这张照片中的5:

示例 model

你的意思是这样的吗? 为浅绿色输入大于 5 的数字,为橙色输入小于 5 的数字。

 document.getElementById('applyNum').addEventListener('click', function() { document.getElementById('numCon').innerHTML = document.getElementById('numInput').value; const v = document.getElementById('numCon').innerHTML; if (v >= 5) { document.getElementById('numCon').style.borderLeft = '2px solid aqua'; document.getElementById('numCon').style.borderBottom = '2px solid aqua'; } else if (v < 5) { document.getElementById('numCon').style.borderLeft = '2px solid orange'; document.getElementById('numCon').style.borderBottom = '2px solid orange'; } })
 #numCon { display: flex; justify-content: center; align-items: center; position: absolute; top: 25%; left: 5%; width: 50px; height: 50px; font-size: 5vw; border-radius: 50%; }
 <input id='numInput' /> <button id='applyNum'>Apply Number</button> <div id="numCon"></div>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM