CSS3淡入淡出Tab菜单

版权:原创 更新时间:1年以上
[该文章底部包含文件资源,可根据自己情况,决定是否下载资源使用,时间>金钱,如有需要,立即查看资源]

以下是 CSS3淡入淡出Tab菜单 的示例演示效果:

当前平台(PC电脑)
  • 平台:

部分效果截图:

CSS3淡入淡出Tab菜单

HTML代码(index.html):

<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>CSS3淡入淡出Tab菜单</title>
    <link rel="stylesheet" href="css/style.css" media="screen" type="text/css" />
</head>

<body>
    <article class="tabs">

        <input checked id="one" name="tabs" type="radio">
        <label for="one">Tab One</label>

        <input id="two" name="tabs" type="radio" value="Two">
        <label for="two">Tab Two</label>

        <input id="three" name="tabs" type="radio">
        <label for="three">Tab Three</label>

        <input id="four" name="tabs" type="radio">
        <label for="four">Tab Four</label>

        <div class="panels">

            <div class="panel">
                <h2>This is Panel One</h2>
                <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris vel leo sem. Sed nec quam sit amet lorem volutpat ullamcorper ut sed massa. Sed vel felis velit. Nullam et turpis sed dui auctor vehicula quis a dui.</p>

                <p>Aliquam vitae leo et sapien volutpat accumsan quis eget turpis. Etiam ac metus vitae purus semper pretium. Curabitur id nisl nisl. Cras ut massa sed dolor ullamcorper consequat ut sed dolor.</p>

                <p>Nam sodales, mi eu convallis adipiscing, ligula justo consectetur tellus, tincidunt vestibulum tortor elit a augue. Ut elementum ultricies orci, vel luctus neque varius in. Phasellus turpis nunc, eleifend ac fringilla at, malesuada in eros.</p>
            </div>

            <div class="panel">
                <h2>This is Panel Two</h2>
                <p>Aliquam vitae leo et sapien volutpat accumsan quis eget turpis. Etiam ac metus vitae purus semper pretium. Curabitur id nisl nisl. Cras ut massa sed dolor ullamcorper consequat ut sed dolor.</p>

                <p>Nam sodales, mi eu convallis adipiscing, ligula justo consectetur tellus, tincidunt vestibulum tortor elit a augue. Ut elementum ultricies orci, vel luctus neque varius in. Phasellus turpis nunc, eleifend ac fringilla at, malesuada in eros.</p>
            </div>

            <div class="panel">
                <h2>This is Panel Three</h2>
                <p>Nam sodales, mi eu convallis adipiscing, ligula justo consectetur tellus, tincidunt vestibulum tortor elit a augue. Ut elementum ultricies orci, vel luctus neque varius in. Phasellus turpis nunc, eleifend ac fringilla at, malesuada in eros.</p>

                <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris vel leo sem. Sed nec quam sit amet lorem volutpat ullamcorper ut sed massa. Sed vel felis velit. Nullam et turpis sed dui auctor vehicula quis a dui.</p>

                <p>Aliquam vitae leo et sapien volutpat accumsan quis eget turpis. Etiam ac metus vitae purus semper pretium. Curabitur id nisl nisl. Cras ut massa sed dolor ullamcorper consequat ut sed dolor.</p>
            </div>

            <div class="panel">
                <h2>This is Panel Four</h2>
                <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris vel leo sem. Sed nec quam sit amet lorem volutpat ullamcorper ut sed massa. Sed vel felis velit. Nullam et turpis sed dui auctor vehicula quis a dui.</p>

                <p>Aliquam vitae leo et sapien volutpat accumsan quis eget turpis. Etiam ac metus vitae purus semper pretium. Curabitur id nisl nisl. Cras ut massa sed dolor ullamcorper consequat ut sed dolor.</p>
            </div>

        </div>

    </article>
</body>
</html>









CSS代码(style.css):

body{font-family:Cambria,Arial;background:#333;}
.tabs{width:100%;max-width:600px;margin:50px auto;}
input{opacity:0;}
label{cursor:pointer;background:-webkit-linear-gradient(#666,#555);color:#eee;border-radius:5px 5px 0 0;padding:1.5% 3%;float:left;margin-right:2px;font:italic 1em cambria;}
label:hover{background:-webkit-linear-gradient(#777,#666);}
input:checked + label{background:#fff;color:#333;}
.tabs input:nth-of-type(1):checked ~ .panels .panel:first-child,.tabs input:nth-of-type(2):checked ~ .panels .panel:nth-child(2),.tabs input:nth-of-type(3):checked ~ .panels .panel:nth-child(3),.tabs input:nth-of-type(4):checked ~ .panels .panel:last-child{opacity:1;-webkit-transition:.3s;}
.panels{float:left;clear:both;position:relative;width:100%;background:#fff;border-radius:0 10px 10px 10px;min-height:315px;}
.panel{width:100%;opacity:0;position:absolute;background:#fff;border-radius:0 10px 10px 10px;padding:4%;box-sizing:border-box;}
.panel h2{margin:0;font-family:Arial;}
附件:下载该文件资源,减少时间成本(增值服务)
留言
该资源可下载
File Source
.rar
1.67 KB
Html CSS3特效
最新结算
股权转让协议意向书模板
类型: .docx 金额: CNY 2.23¥ 状态: 待结算 详细>
股权转让协议意向书模板
类型: .docx 金额: CNY 0.28¥ 状态: 待结算 详细>
CSS3图片向上3D翻转渐隐消失特效
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
CSS3图片向上3D翻转渐隐消失特效
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
.net c# 将金额转人名币大写金额
类型: .rar 金额: CNY 2.39¥ 状态: 待结算 详细>
.net c# 将金额转人名币大写金额
类型: .rar 金额: CNY 0.3¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 2.23¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 0.28¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 2.23¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 0.28¥ 状态: 待结算 详细>
我们力求给您提供有用的文章,再此基础上,会附加营收资源,不做任何广告,让平台可以更好发展 若您发现您的权利被侵害,或使用了您的版权,请发邮件联系 sunlifel@foxmail.com ggbig觉得 : 不提供源码的文章不是好文章
合作伙伴
联系我们
  • QQ:21499807
  • 邮箱:sunlifel@foxmail.com
  • QQ扫一扫加QQ
    QQ扫一扫
Copyright 2023-2024 ggbig.com·皖ICP备2023004211号-1
打赏文章