本文實例為大家分享了js Tab選項卡切換效果,供大家參考,具體內容如下
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>tab</title> <style> *{margin:0; padding:0; list-style:none;} .box{ width: 1000px; overflow: hidden; margin:100px auto 0px; } #title{ line-height: 40px; background-color: rgb(247,247,247); font-size: 16px; font-weight: bold; color: rgb(102,102,102); overflow: hidden; } #title span{ float: left; width: 166px; text-align: center; } #title span:hover{ /*color: black;*/ cursor: pointer; } #content{ margin-top: 20px; } #content li{ width: 1050px; overflow: hidden; display: none; background-color: rgb(247,247,247); } #content li div{ width: 156px; margin-right: 14px; float: left; text-align: center; } #content li div a{ font-size: 14px; color: black; line-height: 14px; /* float: left;*/ display: inline-block; margin-top: 10px; } #content li a:hover{ color: #B70606; } #content li div span{ font-size: 16px; line-height: 16px; /*float: left;*/ display: block; color: rgb(102,102,102); margin-top: 10px; } #content img{ float: left; width: 155px; height: 250px; } #title .select{ background-color: rgb(10,167,112); color: white; } #content .show{ display: block; } </style></head><body> <div class="box"> <p id="title"> <span class="select">帥哥</span> <span>美女</span> <span>寵物</span> <span>影視</span> <span>英雄聯盟</span> <span>音樂</span> </p> <ul id="content"> <li class="show"> <div><img src="images/shuaige1.jpg" alt="帥哥1"><a href="#">杰森?史坦森</a><span>狂拽炫酷
主站蜘蛛池模板:
贵南县|
和顺县|
甘谷县|
浦县|
饶平县|
周宁县|
射阳县|
工布江达县|
车险|
拜泉县|
万盛区|
平泉县|
平安县|
大竹县|
濉溪县|
阿尔山市|
玉树县|
明光市|
延边|
双牌县|
包头市|
贵阳市|
荣昌县|
乐业县|
玉林市|
石棉县|
泾川县|
长治市|
菏泽市|
临高县|
获嘉县|
宾阳县|
凤山市|
手机|
巴青县|
屏山县|
社旗县|
远安县|
察隅县|
屏山县|
社旗县|