我在寻找一种在按钮内显示gif的方法,按钮内应该有一个gif,在悬停时开始播放。
那么,你需要使用CSS
<style> .button { background: url('gifname.gif'); border: none; background-repeat: no-repeat; object-fit: cover; } </style> <button class="button">
希望能解决你的问题