HTML Form How to - Create CSS3 Circle Button








Question

We would like to know how to create CSS3 Circle Button.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.example {<!--  w ww .  java2 s. c  om-->
  border-radius: 50%;
  background: #000;
  border: 3px solid #6699ff;
  width: 50px;
  height: 50px;
  line-height: 50px;
  text-align: center;
}

.example img {
  width: 25px;
  height: 25px;
  vertical-align: middle;
}
</style>
</head>
<body>
  <div class="example">
    <img src="https://g.twimg.com/Twitter_logo_blue.png">
  </div>
</body>
</html>

The code above is rendered as follows: