This article mainly explains the style of buttons. 1. Options 2. Size 3. Activity Status 4. Disabled state 5. Html tags that can be used as buttons 6. Summary Options Use the classes listed above to quickly create a styled button.
size Need your buttons to be different sizes? Use .btn-lg, .btn-sm, .btn-xs to get buttons of different sizes.
By adding .btn-block to the button, it can fill 100% of the width of the parent node, and the button also becomes a block-level element.
Activity Status When the button is active, it appears pressed (darker background, darker border, inset shadow). For the B<button> element, this is achieved through :active. For the <a> element, this is achieved through .active. However, you can also use .active<button> in conjunction with it and make it active programmatically. Button elementSince :active is a pseudo-state, there is no need to add it, but you can add .active if you need to show the same appearance.
You can add .activeclass to <a>.
You can compare it with the button above. Disabled state By fading the background color of the button by 50%, you can make it appear unclickable. Button elementAdd the disabled attribute to <button>.
You can put the mouse on the button and click it to see the effect. Cross-browser compatibilityLink Elements Add .disabledclass to <a>.
This is a comparison with the button above. We use .disabled as a utility class, just like .activeclass, so there is no need to add a prefix. Link functionality is not affected Context-specific usage Html tags that can be used as buttons You can add button class to <a>, <button> or <input> elements.
Cross-browser performance Summarize This section mainly explains the style of button buttons. The main thing is to flexibly run these styles for control. |
<<: Example code for using CSS to darken the font color of the selected area when scrolling
>>: Detailed explanation of writing and using Makefile under Linux
Introducing the Geo module of Nginx The geo direc...
Table of contents File() grammar parameter Exampl...
Mapping the mouse position or implementing drag e...
This article shares the encapsulation code of Jav...
The specific method is as follows: CSS Code Copy ...
This article describes how to install the PHP cur...
The four property values of position are: 1.rel...
Table of contents Preface 1. Configure intranet D...
Table of contents 1. Eclipse configures Tomcat 2....
Preface First, let's see how to identify a TC...
Lambda Expressions Lambda expressions, also known...
MySQL 5.7.27 detailed download, installation and ...
VMWare (Virtual Machine ware) is a "virtual ...
js date time format Convert the date and time to ...
This article example shares the specific code for...