This article mainly introduces the menu, buttons, and navigation materials of the Bootstrap getting started book (4). For more information, see what we will learn next, these are some of the components provided by Bootstrap. these components are very simple to use and can help us build websites conveniently and quickly, and achieve a good display effect. The most
DOCTYPE HTML>HTML>HeadLang= "en"> Metaname= "Viewport"content= "Width=device-width"/> MetaCharSet= "UTF-8"> title>title> new Bootstrap core CSS file - Linkrel= "stylesheet"href= "//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css"> HTML5 Shim and Respond.js for IE8 support of HTML5 elements and media queries - WARNING:Respond.js doesn ' t work if you view the page via file:// -
Menu creation has changed in the Bootstrap version 3.0 and above.Now, we just need to remember 3 classes of dropdown open Dropdown-menu.The first two are used for the parent element of the UL list, and the last one is for UL.Now directly on the code.Divclass= "Dropdown open"> ulclass= "Dropdown-menu"> Li>ahref= "javascript:void (0)">11
. dropdown--sets the parent element as a drop-down menu component, and the submenu pops down;. dropup--set the parent element as a drop-down menu component and pop up the submenu;The. dropdown-toggle--Setting button is a drop-down menu toggle button;. dropdown-menu--set the UL element as a drop-down
Alignment
Left-aligned. Dropdown-menu-left {Right/left}
Right-aligned. Dropdown-menu-right {Right/left}
Elements caused by overflow of other elements are occluded and need to be solved by themselves.
Pull-down Menu-Menu title
Title. Drop-header {Font-size/color}
Pull-down
Adding a level Two menu to the navigation bar is also very simpleDivclass= "NavBar Navbar-default"role= "Navigation"> Divclass= "Navbar-header"> ahref="##"class= "Navbar-brand">Navigation bara> Div> ulclass= "Nav navbar-nav"> Liclass= "Active">ahref="##">Website Homea>Li> Liclass= "Dropdown"> ahref="##"Data-toggle= "Dropdown"class= "Dropdown-toggle">Series Tutorialsspanclass= "Caret">span>a> ulclass=
The default state of a drop-down menu item (without setting) has a suspended state (: hover) and Focus State (: Focus).The drop-down menu item has the current state (. Active) and disabled state (. Disabled) In addition to the above two states. These two state usage methods only need to add the corresponding class name on the corresponding menu item.Divclass= "Dr
Add the code to the JSP:. navbar. Nav > li:hover. dropdown-menu {Display:block;}The entire code looks like this:pageencoding= "Utf-8"%>Bootstrap navigation bar mouse hover display drop-down menu
The steps to create a tabbed navigation menu are:
• Add Class Nav to the UL tag
• Add Class. Nav-tabs to the UL tag.
Add active on the LI tag to activate the item
To create a capsule label, just change the nav-tabs to: Nav-pills.
The above is a small set to introduce the Nineth chapter bootstrap navigation menu to create the ful
First of all, I would like to say that my implementation of the idea: to div a class "dropdown", the drop down menu in this div can be displayed bootstrap drop-down menu.
The above is a small set to introduce the eighth Bootstrap Drop-down menu example code of all
to the current option.
Bootstrap provides button dropdown to make a nice menu, not just a select feature. When I searched for it, I thought Bootstrap could provide a select component similar to the button dropdown style. But I am delusional, without this component, the component must be implemented. In fact, with the UL and Li write select label experience, wri
1. Import in Projectsrc= "/assets/admin/layout/scripts/layout.js">script> 2. Add a unique ID to the subproject item and click the current page to transfer the current unique ID to the controller. "@[email protected]" id="@item2. Idclass="icon-settings" >0class="" ">} 3. The ID of the incoming highlight in the controller that needs to be highlighted on the main page Public ActionResult List (string id) {VIEWBAG.CLASSID = ID. ToLower (); return View
When we handle the background to display the current page, the current page menu item highlighting, we can use the JS method, also use the program implementation, using the bootstrap template processing one of the highlighting and expansion method1. Import in Projectsrc= "/assets/admin/layout/scripts/layout.js">Script >2. Add a unique ID to the subproject item and click the current page to transfer the cur
Bootstrap accordion menu implementation code
Well, I don't need to talk much about it. I just paste the code for you. The specific code is as follows:
The above is the implementation code of the Bootstrap accordion menu introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave
Bootstrap style and drop-down menu
Background Color bg-primaryFont color text-primary
Text center text-center
Button btn-primary btn-default btn-linkThe default button size is md btn-lg/sm/xs.Input box size: input-lg/sm/xsStatus active/disabledBox alert-primary
Panel
Panel framework panel-primaryPanel title panel-headingPanel Subject panel-bodyPanel step panel-footer
Form
Form-groupForm-control: Alignment
Razor View, master page
Still not much to say, directly on the code
Here's the point.
$.widget.bridge (' UIButton ', $.ui.button);
var _url = $.geturlparam ("cid");
$ (". Sidebar-menu li a"). each (function () {//Reserved menu open Status
var _id = $ (this). Data ("id");
if (_id = = _url) {
$ (this). Parent (). Parent (): Show ();
}
});
My page has a drop-down menu, the page has a text input box, an image upload box, the text input box by default is displayed, and the picture upload box is hidden.
Let's say the dropdown menu has two items A and B, I want to achieve the effect: Click A to display a text input box, hide the image input box, click b Display image upload box, hidden text input box , how to achieve?
With Firebug debugging fou
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.