js+css实现移动端抽屉式导航
前言 移动端导航多种多样,抽屉式导航就是常见之一,下面我们通过javascript和css相结合来实现移动端的抽屉式导航。先看看实现的效果: index.html <!DOCTYPE html> < html lang = " zh-CN " > < head > < meta charset = " UTF-8 " > < meta http-equiv = " X-UA-Compatible " content = " IE=edge " > < meta name = " viewport " content = " width=device-width, initial-scale=1.0 " > < title > 抽屉式demo </ title > < link rel = " stylesheet " href = " ./css/index.css " > </ head > < body > < div id = " root " > < div class = " box " > < div class = " btn-box " > < button id = " btn " class = " btn " > < span > </ span > < span > </ span > < span > </ span > </ button > </