html:
css:
*{margin: 0;padding: 0}li{list-style: none}.bor{margin: 0 auto;width: 400px;height: 520px;border: 2px solid #000;margin-top: 50px;overflow: hidden;text-align: center;}.s_text{margin: 0 auto;width: 330px;height: 80px;margin-top: 15px;border: 2px solid #000000;font-size: 30px;padding-left: 20px;}.main{margin: 0 auto;width: 350px;height: 400px;margin-top: 15px;}.main ul{display: flex;height: 100%;justify-content: space-between;flex-wrap: wrap;}.main ul li{width: 80px;height: 80px;border: 1px solid #000000;text-align: center; line-height:80px;font-size: 36px;cursor: pointer ;}.main ul li:hover{background: #eeeeee;}
js:(将这段代码写在body最下面)
上一篇:JS数组的基本用法