Bootstrap anchor style

Style anchor as button and disable them

We can use btn class to make an anchor look like a button and add the .disabled class to <a> buttons to disable them.


<!DOCTYPE HTML>
<html>
<head>
<link href="http://java2s.com/style/bootstrap.min.css" rel="stylesheet">
</head><!--  w w  w  .  java 2  s  . com-->
<body style='margin: 20px;'>

  <a href="#" class="btn btn-primary btn-lg disabled">Primary link</a>
  <a href="#" class="btn btn-default btn-lg disabled">Link</a>

</body>
</html>

Click to view the demo

We use .disabled as a utility class here, similar to the common .active class, so no prefix is required.





















Home »
  Bootstrap »
    Bootstrap »




Introduction
Basic HTML Style
List
Table
Form
Layout
Navigation Bar
Button
Control