简体   繁体   中英

How to make a bootstrap button inset

How do I make a bootstrap 4 button look as if it's been clicked? I need someone with a little bit of artistic ability to add a drop shadow or inset or something.

 <link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.2/css/bootstrap.css" rel="stylesheet"/> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.2/js/bootstrap.js"></script> <a class="btn btn-lg btn-primary">Primary</a> <a class="btn btn-lg btn-primary active">active</a> 

Add the active class.

<a class="btn btn-lg btn-primary active">Primary</a>

From the documentation:

Buttons will appear pressed (with a darker background, darker border, and inset shadow) when active.

I created a JSFiddle here as an example.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM