Add a specific color to a button - HTML CSS Bootstrap

HTML CSS examples for Bootstrap:Button

Description

Add a specific color to a button

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  <style>
  .btn-default {<!--from   ww  w.  jav a 2s . com-->
      background: #000;
      color: #fff;
   }
  .btn-default:hover {
      background: #fff;
      color: #000;
   }
  </style>
</head>
<body>

<div class="container">
  <h2>Customized Buttons</h2>
  <p>Black button:</p>
  <button type="button" class="btn btn-default">Button</button>
</div>

</body>
</html>

Related Tutorials