特效描述:利用html5實現 鼠標拖拽 填充游戲 代碼,利用html5實現鼠標拖拽填充游戲代碼
代碼結構
1. 引入CSS
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.min.css'> <link rel="stylesheet" href="css/style.css">
2. 引入JS
<script src="js/script.js"></script>
3. HTML代碼
<section class="score"> <span class="correct">0</span>/<span class="total">0</span> <button id="play-again-btn">再玩一次</button> </section> <section class="draggable-items"></section> <section class="matching-pairs"></section> <div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';"> </div>