bootstrap mouse hover

  • 262
  • 0
  • 2017-11-28

bootstrap mouse hover


<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <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>
  .cls_effect{
    background-color:#0084ff;    
    color:#FFFFFF;
    padding:10px;
    border:2px solid;
    border-radius:5px;
    text-align:center;
  }
  .cls_effect:hover{
    opacity: 0.5;
  }
  </style>
</head>
<body>
  <div class="container">
    <h1>Hello World!</h1>
    <p>opacity: 0.5; /*透明度設為 0.5*/</p>
    <br>
    <div class="row">
      <div class="col-xs-3 col-sm-3 ">
          <div class="cls_effect">
          1234
          </div>
      </div>
      <div class="col-xs-3 col-sm-3 ">
          <div class="cls_effect">
          567	
          </div>
      </div>
      <div class="col-xs-3 col-sm-3 ">
          <div class="cls_effect">
          89
          </div>
      </div>
      <div class="col-xs-3 col-sm-3 ">
          <div class="cls_effect">
          1
          </div>
      </div>
    </div>
  </div>
</body>
</html>

範例 : 

https://jsfiddle.net/toreoo123456/L3g2zgxd/6/