zoukankan      html  css  js  c++  java
  • css3 笔记 选卡

    <!DOCTYPE html>
    <html>
    
        <head>
            <meta charset="UTF-8">
            <title></title>
            <style type="text/css">
                .widget-tab input{display:none}/* radio 隐藏 */
                .widget-tab .widget-box ul{display:none}/* 需要展示内容的容器全部隐藏 */
                
                #new:checked ~ .widget-title .new,
                #hot:checked ~ .widget-title .hot,
                #random:checked ~ .widget-title .random{background:#F7F7F7} /* 设置选择的模块标题 背景颜色 */
                
                #new:checked ~ .widget-box .new-list,
                #hot:checked ~ .widget-box .hot-list,
                #random:checked ~ .widget-box .random-list{display:block}/* radio 选中时,显示指定的容器框 */
            </style>
        </head>
    
        <body>
            <div class="widget widget-tab">
                <input type="radio" name="widget-tab" id="new" checked="checked" />
                <input type="radio" name="widget-tab" id="hot" />
                <input type="radio" name="widget-tab" id="random" />
                <div class="widget-title inline-block">
                    <ul>
                        <li class="new">
                            <label for="new">最新博文</label>
                        </li>
                        <li class="hot">
                            <label for="hot">热评博文</label>
                        </li>
                        <li class="random">
                            <label for="random">随机博文</label>
                        </li>
                    </ul>
                </div>
                <div class="widget-box">
                    <ul class="new-list">
                        <li>…最新博文…1.。。</li>
                    </ul>
                    <ul class="hot-list">
                        <li>热评博文000…2…</li>
                    </ul>
                    <ul class="random-list">
                        <li>随机博文…3…0000</li>
                    </ul>
                </div>
            </div>
        </body>
    
    </html>

  • 相关阅读:
    软件工程个人作业01
    阅读计划及浅读问题
    引言作业1
    多态和异常分析课后
    大道至简七八章阅读
    接口与继承 课后实践
    构建执法阅读笔记02
    冲刺第五天
    学习进度条七
    冲刺第四天
  • 原文地址:https://www.cnblogs.com/lanyubaicl/p/10773139.html
Copyright © 2011-2022 走看看