1 引入所需要的文件

css:

1.jpg

js:

2.jpg

2 html:

3.jpg

3 js代码

4.jpg

4 界面效果

5.jpg