温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

css实现tab效果仿163邮箱样式的方法

发布时间:2021-03-18 14:16:26 来源:亿速云 阅读:274 作者:小新 栏目:web开发

这篇文章将为大家详细讲解有关css实现tab效果仿163邮箱样式的方法,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。

css实现tab效果仿163邮箱样式的方法

代码如下:

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
    <title>163邮箱tab</title>
    <style type="text/css">
       *{
            margin: 0px;
            padding: 0px;
        }
        .dvTab
        {
            font-family: 'Microsoft Yahei',verdana;
            font-size:14px;
            height: 36px;
            position: absolute;
            left: 0px;
            width: 100%;
            top: 52px;
        }
        .menu
        {
            margin-left:12px;
            color: rgb(106, 106, 106);
        }
        .tab
        {
            list-style-type:none;
            float:left;
            margin-right: -1px;
            border:solid 1px #B9C4CF;
            width:91px;
            background: -moz-linear-gradient(center top , rgb(254, 255, 255), rgb(218, 232, 246)) repeat scroll 0% 0% transparent;
            background-color:#EBF3FA;
            height:23px;
            line-height:23px;
            text-align: center;
            padding: 5px 20px 4px 8px;           
            border-top-left-radius: 3px;
            border-top-right-radius: 3px;            
            text-overflow: ellipsis;
        }
        .dv
        {
            width: 100%;
            height:4px;     
            line-height:4px;       
            background-color:#135AA4;
            position:absolute;
            left:0;
            top:33px;
        }
        .activeTab
        {  
            color:#fff;
            border-color:#135AA4;
            background-color:#135AA4;          
            background: -moz-linear-gradient(center top , rgb(25, 111, 198), rgb(19, 91, 165)) repeat scroll 0% 0% transparent;
        }
     </style>
</head>
<body>
    <div class="dvTab">
        <ul class="menu">
            <li  class="tab">首页</li>
            <li  class="tab">通讯录</li>
            <li  class="tab activeTab">应用中心</li>
            <li  class="tab">收件箱</li>
            <li  class="tab">写信</li>
        </ul>
        <div class="dv"></div>
     </div>
</body>
</html>

关于“css实现tab效果仿163邮箱样式的方法”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI