• Bootstrap 点击按钮切换内容


    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="utf-8">
            <title></title>
            <!-- CSS -->
            <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
            <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
            <style type="text/css">
                h4{
                    margin: 40px 0 10px;
                }
                .nav-tabs{
                    margin-bottom: 15px;
                }
            </style>
        </head>
        <body>
            <div class="container">
                <h4>Tabs</h4>
                <ul id="myTab" class="nav nav-tabs">
                    <li class="active"><a href="#home" data-toggle="tab">Home</a></li>
                    <li><a href="#myhome" data-toggle="tab">myHome</a></li>
                    <li class="dropdown">
                        <a href="#" id="myTbaDrop1" class="dropdown-toggle" data-toggle="dropdown">
                            DropDown <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu" role="menu" aria-labelledby="myTabDrop1">
                            <li><a href="#fat" tabindex="-1" data-toggle="tab">@fat</a></li>
                            <li><a href="#mdo" tabindex="-1" data-toggle="tab">@mdo</a></li>
                        </ul>
                    </li>
                </ul>
                <div id="myTabContent" class="tab-content">
                    <div class="tab-pane active" id="home">
                        <p>1asdadfasddasdsad</p>
                    </div>
                    <div class="tab-pane " id="myhome">
                        <p>3asdadfasddasdsad</p>
                    </div>
                    <div class="tab-pane " id="fat">
                        <p>4asdadfasddasdsad</p>
                    </div>
                    <div class="tab-pane " id="mdo">
                        <p>5asdadfasddasdsad</p>
                    </div>
                </div>
            </div>
            
            
            
            
            
            <!-- jQuery and JavaScript Bundle with Popper -->
            <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
            <script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
        </body>
    </html>

     

     

  • 相关阅读:
    Sublime 官方安装方法
    Notepad2、Sublime_text带图标的右键快捷打开方式
    创业公司如何实施敏捷开发
    如果有人让你推荐编程技术书,请叫他看这个列表
    Spring cron表达式详解
    Spring定时任务的几种实现
    spring注解方式 idea报could not autowire,eclipse却没有问题
    mysql处理海量数据时的一些优化查询速度方法
    Hexo重装小结
    修改JAVA代码,需要重启Tomcat的原因
  • 原文地址:https://www.cnblogs.com/hechunfeng/p/15258054.html
Copyright © 2020-2023  润新知