HTML Form How to - Hover circle button








Question

We would like to know how to hover circle button.

Answer


<!DOCTYPE html>
<html>
<head>
Button<!--from  w w  w. ja v  a 2  s.c  om-->
<style type='text/css'>
div {
  text-align: center;
  height: 400px;
  width: 100%;
  border: 2px #000 solid;
}
a {
  text-align: center;
  margin: auto;
}
div section {
  width: 65%;
  height: 50%;
  margin: 20% auto;
}
.cbtn {
  display: block;
  width: 60px;
  height: 60px;
  border-radius: 50px;
  background: transparent;
  border: solid gray 1px;
  margin: 2px;
  -o-transition: .5s;
  -ms-transition: .5s;
  -moz-transition: .5s;
  -webkit-transition: .5s;
  transition: .5s;
  float: left;
}
.cbtn:hover {
  text-decoration: none;
  background: #F3734F;
}
</style>
</head>
<body>
  <div>
    <section>
      <a href="#" id="mail" class="cbtn"></a> 
      <a href="#" class="cbtn"></a>
      <a href="#" class="cbtn"></a> 
      <a href="#" class="cbtn"></a> 
      <a href="#" class="cbtn"></a>
    </section>
  </div>
</body>
</html>

The code above is rendered as follows: