* { margin:0; padding:0; box-sizing:border-box; } #tabs { width:800px; height:400px; position:relative; padding:20px; margin:0 auto; } #tabs > ul { list-style:none; overflow:hidden; } #tabs > ul > li { float:left; line-height:30px; width:80px; text-align:center; border:1px solid black; border-radius:5px; margin:5px; cursor:pointer; user-select:none; } #tabs > ul > li.active { background-color:greenyellow; } #tabs > div { position:absolute; padding:10px; border:1px solid black; box-shadow:3px 3px 3px #ccc; width:800px; height:320px; display:none; } #tabs > div.show { display:block; }
更新时间:2020-06-01 00:15:28
就是简单的选项卡功能 希望大家喜欢