您现在的位置: 万盛学电脑网 >> 程序编程 >> 网页制作 >> DivCSS教程 >> 正文

纯css实现的tab切换效果的方法

作者:佚名    责任编辑:admin    更新时间:2022-06-22

我们为大家收集整理了关于纯css实现的tab切换效果,以方便大家参考。

body,div,ul,li{margin:0; padding:0; font-size:12px;}

.clearFloat{ clear:both; height:0; line-height:0; font-size:0;}

.tab_ul{ margin:10px auto 0; padding-left:20px; width:228px; height:31px; background-color:#FCEDFF;border:1px solid #DBA4E8; border-bottom:0;}

.tab_ul li{ float:left; display:inline; margin:5px 0 0 5px; width:46px; height:26px;}

.tab_ul li a{ display:block;width:46px; height:26px; line-height:26px; text-align:center;font-size:12px; color:#000000; text-decoration:none;}

.tab_ul li a:hover{color:#5F0082; font-weight:bold;}

.tabDiv{ margin:0 auto; width:248px; height:200px; border:1px solid #DBA4E8; border-top:0; overflow:hidden;}

.tabDiv ul{ margin:0 auto; padding-top:10px; width:218px; height:190px;}

.tabDiv ul li{ height:24px;color:#666666; font-size:12px; margin-left:20px; }

.tabDiv ul li a{ color:#333333; margin-left:5px;}

希望大家可以学会纯css实现的tab切换效果.想了解更多精彩内容,请关注我们的网站!

相关推荐:

如何让某个页面使用特定的CSS呢