• \r\n 

    你好<\/h1>\r\n \r\n 

    亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

    Home php教程 PHP開發(fā) Learn to use bootstrap (navigation bar, drop-down menu, carousel, grid layout, etc.)

    Learn to use bootstrap (navigation bar, drop-down menu, carousel, grid layout, etc.)

    Dec 03, 2016 am 10:49 AM
    bootstrap

    This article is a year-end summary of learning and using bootstrap for your reference. The specific content is as follows

    bootstrap framework

    BootStrap learning starts from now on. The front-end development framework Bootstrap can greatly simplify the website development process and is thus loved by the majority of developers. .

    <!DOCTYPE html>
    <html lang="zh-cn"><!-- 語言設(shè)置 -->
     <head>
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width, initial-scale=1"><!-- 瀏覽器縮放 -->
     <title>Bootstrap</title>
     <!-- Bootstrap -->
     <link href="css/bootstrap.min.css" rel="stylesheet">
     
     <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
     <!-- WARNING: Respond.js doesn&#39;t work if you view the page via file:// -->
     
     <!--[if lt IE 9]>
     <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
     <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
     
     </head>
     <body>
     <h1>你好</h1>
     <!-- jQuery (necessary for Bootstrap&#39;s JavaScript plugins) -->
     <script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
     <!-- Include all compiled plugins (below), or include individual files as needed -->
     <script src="js/bootstrap.min.js"></script>
     </body>
    </html>

    Navigation

    Navigation is no stranger to a front-end person. It can be said that navigation is one of the important elements and components of a website, which can facilitate users to find various functional services provided by the website.

    <nav class="nabber navbar-default" role="navigation"><!--導(dǎo)航條、默認(rèn)樣式、role定義內(nèi)容是一個(gè)導(dǎo)航條-->
     <div class="container-fluid"><!--container居中固定寬度、c-f自適應(yīng)大小的導(dǎo)航條-->
     <div class="navbar-header">
     
     <!--在響應(yīng)式瀏覽器寬度小于一定值時(shí),顯示按鈕-->
     <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
     <span class="sr-only">Toggle navigation</span>
     <span class="icon-bar"></span>
     <span class="icon-bar"></span>
     <span class="icon-bar"></span>
     </button>
     
     <!--logo圖標(biāo)-->
     <a class="navbar-brand" href="#">Brand</a>
     
     </div>
     
     <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"><!--包裹代碼,在寬度大于一定值時(shí),button和此代碼是沒有作用的-->
     
     <!--導(dǎo)航條導(dǎo)航項(xiàng)目-->
     <ul class="nav navbar-nav">
     <li class="active"><a href="#">a</a></li>
     <li><a href="#">a</a></li>
     </ul>
     </div>
     </div>
    </nav>
     .navbar-inverse:改變導(dǎo)航條的背景顏色
     .container:居中顯示
     固定導(dǎo)航條會遮蓋頁面內(nèi)容,解決辦法設(shè)置body的*padding-top*

    Drop-down menu

    Friends, please note that the drop-down menu component in the Bootstrap framework is an independent component.

    <li class="dropdown">
     <a href="#" class="dropdown-toggle" data-toggle="dropdown">下拉菜單<span class="caret"></span></a>
     <ul class="dropdown-menu" role="menu">
     <li><a href="#">Action</a></li>
     <li><a href="#">Another action</a></li>
     <li><a href="#">Something else</a></li>
     <li class="divider"></li>
     <li><a href="#">linkkk/a></li>
     </ul>
    </li>

    The data attribute API can use all Bootstrap plug-ins

    Carousel ads (carousel)

    <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
     
     <!--底部導(dǎo)航點(diǎn)。。。-->
     <ol class="carousel-indicators">
     <li data-target="#carousel-example-generic" data-slide-to="0"></li>
     <li data-target="#carousel-example-generic" data-slide-to="1" class="active"></li>
     <li data-target="#carousel-example-generic" data-slide-to="2"></li>
     </ol>
     
     <!--輪播廣告內(nèi)容-->
     <div class="carousel-inner" role="listbox">
     <div class="item active">
     <img src="…">
     <div class="carousel-caption">……</div>
     </div>
     <div class="item active">
     <img src="…">
     <div class="carousel-caption">……</div>
     </div>
     </div>
     
     <!--左右箭頭-->
     <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
     <span class="glyphicon glyphicon-chevron-left"></span>
     <pan class="sr-only">previous</span>
     </a>
     <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
     <span class="glyphicon glyphicon-chevron-right"></span>
     <pan class="sr-only">Next</span>
     </a>
    </div>

    .data-slide-to index, pointing to the content of the carousel ads, starting from 0
    .carousel sets the style of the advertising box (Height, background color)
    .carousel .item Set the style of the advertising box (height, background color)
    Grid system layout

    <div class="container">
     <div class="row">
     <div class="col-md-4">.col-md-4</div>
     <div class="col-md-4">.col-md-4</div>
     <div class="col-md-4">.col-md-4</div>
     </div>
    </div>

    Tab page tabs

    <!--標(biāo)簽-->
    <ul class="nav nav-tabs" role="tablist">
     <li class="active"><a href="#home" role="tab" data-toggle="tab">Home</a></li>
     <li><a href="#profile" role="tab" data-toggle="tab">Profile</a></li>
     <li><a href="#messages" role="tab" data-toggle="tab">Messages</a></li>
     <li><a href="#settings" role="tab" data-toggle="tab">Settings</a></li>
    </ul>
     
    <!--標(biāo)簽的內(nèi)容-->
    <div class="tab-content">
     <div class="tab-pane active" id="home">…</div>
     <div class="tab-pane" id="profile">…</div>
     <div class="tab-pane" id="messages">…</div>
     <div class="tab-pane" id="settings">…</div>
    </div>

    Tab page tabs

    <div class="modal fade">
     <div class="modal-dialog">
     <div class="content">
     
     <!--標(biāo)簽頭部-->
     <div class="modal-header">
     <button type="button" class="close" data-dismiss="modal">
     <span aria-hidden="true">×</span>
     <span class="sr-only">Close</span>
     <h4 class="modal-title">Modal title</h4>
     </button>
     </div>
     
     <!--標(biāo)簽體-->
     <div class="modal-body">
     …
     </div>
     
     <!--標(biāo)簽底部-->
     <div class="modal-footer">
     <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
     <button type="button" class="btn btn-default" data-dismiss="modal">Save</button>
     </div>
     
     </div>
     </div>
    </div>


    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

    Hot AI Tools

    Undress AI Tool

    Undress AI Tool

    Undress images for free

    Undresser.AI Undress

    Undresser.AI Undress

    AI-powered app for creating realistic nude photos

    AI Clothes Remover

    AI Clothes Remover

    Online AI tool for removing clothes from photos.

    Clothoff.io

    Clothoff.io

    AI clothes remover

    Video Face Swap

    Video Face Swap

    Swap faces in any video effortlessly with our completely free AI face swap tool!

    Hot Tools

    Notepad++7.3.1

    Notepad++7.3.1

    Easy-to-use and free code editor

    SublimeText3 Chinese version

    SublimeText3 Chinese version

    Chinese version, very easy to use

    Zend Studio 13.0.1

    Zend Studio 13.0.1

    Powerful PHP integrated development environment

    Dreamweaver CS6

    Dreamweaver CS6

    Visual web development tools

    SublimeText3 Mac version

    SublimeText3 Mac version

    God-level code editing software (SublimeText3)

    How to use bootstrap in vue How to use bootstrap in vue Apr 07, 2025 pm 11:33 PM

    Using Bootstrap in Vue.js is divided into five steps: Install Bootstrap. Import Bootstrap in main.js. Use the Bootstrap component directly in the template. Optional: Custom style. Optional: Use plug-ins.

    How to write split lines on bootstrap How to write split lines on bootstrap Apr 07, 2025 pm 03:12 PM

    There are two ways to create a Bootstrap split line: using the tag, which creates a horizontal split line. Use the CSS border property to create custom style split lines.

    How to view the date of bootstrap How to view the date of bootstrap Apr 07, 2025 pm 03:03 PM

    Answer: You can use the date picker component of Bootstrap to view dates in the page. Steps: Introduce the Bootstrap framework. Create a date selector input box in HTML. Bootstrap will automatically add styles to the selector. Use JavaScript to get the selected date.

    How to verify bootstrap date How to verify bootstrap date Apr 07, 2025 pm 03:06 PM

    To verify dates in Bootstrap, follow these steps: Introduce the required scripts and styles; initialize the date selector component; set the data-bv-date attribute to enable verification; configure verification rules (such as date formats, error messages, etc.); integrate the Bootstrap verification framework and automatically verify date input when form is submitted.

    How to get the bootstrap search bar How to get the bootstrap search bar Apr 07, 2025 pm 03:33 PM

    How to use Bootstrap to get the value of the search bar: Determines the ID or name of the search bar. Use JavaScript to get DOM elements. Gets the value of the element. Perform the required actions.

    How to use bootstrap button How to use bootstrap button Apr 07, 2025 pm 03:09 PM

    How to use the Bootstrap button? Introduce Bootstrap CSS to create button elements and add Bootstrap button class to add button text

    How to set up the framework for bootstrap How to set up the framework for bootstrap Apr 07, 2025 pm 03:27 PM

    To set up the Bootstrap framework, you need to follow these steps: 1. Reference the Bootstrap file via CDN; 2. Download and host the file on your own server; 3. Include the Bootstrap file in HTML; 4. Compile Sass/Less as needed; 5. Import a custom file (optional). Once setup is complete, you can use Bootstrap's grid systems, components, and styles to create responsive websites and applications.

    10 latest tools for web developers 10 latest tools for web developers May 07, 2025 pm 04:48 PM

    Web development design is a promising career field. However, this industry also faces many challenges. As more businesses and brands turn to the online marketplace, web developers have the opportunity to demonstrate their skills and succeed in their careers. However, as demand for web development continues to grow, the number of developers is also increasing, resulting in increasingly fierce competition. But it’s exciting that if you have the talent and will, you can always find new ways to create unique designs and ideas. As a web developer, you may need to keep looking for new tools and resources. These new tools and resources not only make your job more convenient, but also improve the quality of your work, thus helping you win more business and customers. The trends of web development are constantly changing.

    See all articles