


Bootstrap 3之美06-Page Header、Breadcrumbs、Dropdowns、Button Dropdowns、用Button和Dropdowns模擬Select、Input Groups、Thumbnails、Panels、Wells_html/css_WEB-ITnose
Jun 24, 2016 am 11:59 AM
This article mainly includes:
■ Page Header
■ Breadcrumbs
■ Button Groups
■ Dropdowns
■ Button Dropdowns
■ Use Button and Dropdowns simulate Select
■ Input Groups
■ Thumbnails
■ Panels
■ Wells
□ Page Header
Page Header is Refers to the top of the page.
<div class="page-header"> <h1>超級球迷</h1> <p class="text-warning">關(guān)于我們</p> </div>
The above div will run to the top of the page.
□ Breadcrumbs
Breadcrumbs.
<div class="page-header"> <ol class="breadcrumb"> <li><a href="/">主頁</a></li> <li class="active"><a href="/">關(guān)于我們</a></li> </ol> <p class="text-warning">關(guān)于我們</p> </div>Above, the ol part is bread crumbs.
□ Button Groups
consists of several buttons, but looks like one button.
<div class="row"> <div class="col-md-6 btn-group"> <button class="btn btn-success">按鈕1</button> <button class="btn btn-success active">按鈕2</button> <button class="btn btn-success">按鈕3</button> </div> </div>
btn-group-vertical: Button Group arranged vertically
btn-group-sm: Button Group arranged horizontally by small buttons
A group of radios, plus the data-toggle="buttons" attribute, click on a radio, the button will appear pressed.
<div class="row"> <div class="btn btn-group-sm" data-toggle="buttons"> <label class="btn btn-success"><input type="radio"/>The Dude</label> <label class="btn btn-success"><input type="radio"/>Donny</label> <label class="btn btn-success"><input type="radio"/>Maude</label> </div> </div>
??
□ Dropdowns
Click the button to present the drop-down options.
<div class="row"> <div class="dropdown"> <button class="btn btn-sm btn-success" data-toggle="dropdown">點我</button> <ul class="dropdown-menu"> <li><a href="#" tabindex="-1">Walter</a></li> <li><a href="#" tabindex="-1">Bunny</a></li> <li class="divider"></li> <li class="disabled"><a href="#" tabindex="-1">The Big</a></li> </ul> </div> </div>
□ Button Dropdowns
Combine Button Group and Dropdowns, click a button in the Button Group to display Dropdowns.
<div class="row"> <div class="btn-group btn-group-sm" data-toggle="buttons"> <label class="btn btn-success"><input type="radio"/>The Dude</label> <label class="btn btn-success"><input type="radio"/>Donny</label> <label class="btn btn-success"><input type="radio"/>Maude</label> <div class="btn-group btn-group-sm"> <button class="btn btn-success" data-toggle="dropdown">Other<span class="caret"></span></button> <ul class="dropdown-menu"> <li><a href="#" tabindex="-1">Walter</a></li> <li><a href="#" tabindex="-1">Bunny</a></li> <li class="divider"></li> <li class="disabled"><a href="#" tabindex="-1">The Big</a></li> </ul> </div> </div> </div>
You can also separate the button and arrow button into 2 buttons.
<button class="btn btn-success">Other</button><button class="btn btn-success" data-toggle="dropdown"><span class="caret"></span></button>
□ Use Button and Dropdowns to simulate the Select
html part.
<div class="row"> <div class="dropdown"> <button class="btn btn-success" id="pickButton">請選擇...</button> <button class="btn btn-success" data-toggle="dropdown"><span class="caret"></span></button> <ul class="dropdown-menu" id="reasonDropdown"> <li><a href="#" tabindex="-1">Adoration</a></li> <li><a href="#" tabindex="-1">Ordering a White Flower</a></li> <li><a href="#" tabindex="-1">I am lost</a></li> </ul> </div> </div>
When you click the down arrow and select the Dropdowns option, you need to display the option on the button with the id of pickButton.
Create the site.js file in the js folder.
(function() { "use strict"; var $pckButton = $("#pickButton"); $("#reasonDropdown li a").on("click", function() { var reason = $(this).text(); $pckButton.text(reason); });})();
Put site.js to the bottom of the page.???
□ Pagination
<div class="row"> <div class="input-group"> <span class="input-group-addon">Name</span> <input type="text" class="form-control" name="userName" placeholder="輸入用戶名"/> </div> </div>
It can also have digital pagination.
<div class="row"> <ul class="pager"> <li class="previous"><a href="#">← 上一頁</a></li> <li class="next"><a href="#">下一頁 →</a></li> </ul> </div>
□ Thumbnails
When a div is added with the class="thumbnail" attribute, it facilitates the layout of images and text.
<div class="row"> <ul class="pagination pagination-lg"> <li class="previous"><a href="#">← 上一頁</a></li> <li><a href="#">1</a></li> <li><a href="#">2</a></li> <li><a href="#">3</a></li> <li class="next"><a href="#">下一頁 →</a></li> </ul> </div>
□ Panels
In a div set as a panel, you can have the title part of the panel and the body part of the panel.
<div class="row"> <div class="col-md-4 col-sm-6"> <div class="thumbnail"> <a href="#"><img src="images/18.jpg" class="img-responsive" alt="18"/></a> <div class="caption"> <h3>賽事消息</h3> <p> 當比賽進行到第6分鐘時,郜林近距離攻門被托萊奇封堵,在郜林示意托萊奇有手球時,迪亞曼蒂在球門另一側(cè)的搶射被對手封堵?lián)醭?。主裁判哈桑沒有理會郜林的投訴,慢鏡頭顯示托萊奇確實有手球。 </p> </div> </div> </div> </div>
□Wells
In the div set to well, this div is highlighted when displayed, which has a strong background effect.
<div class="row"> <div class="panel panel-default"> <div class="panel-heading"> <h2>標題</h2> </div> <div class="panel-body"> <p> 全場比賽傷停補時階段,最具爭議性的判罰出現(xiàn)了。在一次拼搶中,劉健背后對薩巴犯規(guī),薩巴隨機倒地,張琳?有一個抬腿動作,試圖避免踩到薩巴,薩巴卻捂著臉在地上劇烈翻滾。 </p> <img src="images/19.jpg" alt="19" class="img-thumbnail"/> </div> </div> </div>
Reference: WilderMinds
<div class="row"> <div class="well well-lg"> <p> 在2014賽季亞冠聯(lián)賽的一場1/4決賽首回合比賽中,廣州恒大客場0-1負于西悉尼流浪者。比賽中,出現(xiàn)了包括張琳?、郜林領(lǐng)到紅牌在內(nèi)的多次爭議判罰。裁判專家張大樵在接受天津體育頻道采訪時表示拉羅卡對張琳?的犯規(guī)比較嚴重,應(yīng)該領(lǐng)到一張黃牌,而張琳?打了拉羅卡的臉則屬于嚴重犯規(guī),主裁判哈桑向他出示紅牌沒有問題。哈桑張冠李戴,對薩巴犯規(guī)的是劉健,卻向郜林出示了紅牌。另外,張大樵認為哈桑在上半場漏判了恒大隊的一個點球。 </p> </div> </div>

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

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.

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.

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 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.

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 use the Bootstrap button? Introduce Bootstrap CSS to create button elements and add Bootstrap button class to add button text

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.

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.
