JS component Bootstrap implementation pop-up box effect code _ javascript skills

Source: Internet
Author: User
This article mainly introduces the relevant information about the code for implementing the pop-up box of JS component Bootstrap. If you are interested in the pop-up box, you can refer to adding a small cover layer for the page content, add additional information to the page elements, just like on the iPad.

Plugin dependency
In the dialog box that appears, the tooltip plug-in must be loaded first.
Optional features
In terms of performance, the data attribute APIs of The tooltip and the pop-up widget are selectively added, that is, you must initialize them yourself.
Additional settings are required when the pop-up box is used in the button group and input box group.
When the prompt box and. btn-group or. when using an input-group combination, you must specify the container: 'body' option (see the following document) to avoid unwanted side effects (for example, after the pop-up box is displayed, the page element to work with may become wider or rounded ).
When you use the pop-up box on a page element that is not allowed, you need to add an additional element to wrap it.
To add a pop-up box to the disabled or. disabled element, wrap the page element to be added in

And then

The element application dialog box appears.
I. Static Cases
Four Optional options: top, right, bottom, and left.

Code segment

.bs-example   {    border-color:#ddd;    border-radius:4px 4px 0 0;    border-width:1px;    box-shadow:none;    margin-left:0;    margin-right:0;    border-style:solid;   }  .bs-example-popover .popover {   position: relative;   display: block;   float: left;   width: 240px;   margin: 20px; } 

3. Dialog Box

Popover top

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

Popover right

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

Popover bottom

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

Popover left

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

Preview Effect

Code segment:

Click to load

Js initialization: 

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.