Button with gradient background color - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Button

Description

Button with gradient background color

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">

form {<!-- ww  w  .  j av a2 s .com-->
   margin: 10px;
}
a.button,
button {
   display: inline-block;
   width: 110px;
   padding: 0;
   margin: 0;
   color: white;
   background: yellow; /* Old browsers */
   background: -moz-linear-gradient(top,  yellow 0%, #95c3ea 100%); /* FF3.6+ */
   background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,yellow), color-stop(100%,#95c3ea)); /* Chrome,Safari4+ */
   background: -webkit-linear-gradient(top,  yellow 0%,#95c3ea 100%); /* Chrome10+,Safari5.1+ */
   background: -o-linear-gradient(top,  yellow 0%,#95c3ea 100%); /* Opera 11.10+ */
   background: -ms-linear-gradient(top,  yellow 0%,#95c3ea 100%); /* IE10+ */
   background: linear-gradient(to bottom,  yellow 0%,#95c3ea 100%); /* W3C */
   filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='yellow', endColorstr='#95c3ea',GradientType=0 ); /* IE6-9 */
   text-shadow: 1px 1px 1px #757575;
   filter: dropshadow(color=#000000, offx=1, offy=1);
   border: 2px solid #79cee6;
   border-radius: 2px;
   text-align: center;
   text-decoration: none;
}
a.button {
   height: 20px;
   line-height:20px;
}
button {
   box-sizing: content-box;
   -webkit-box-sizing: content-box;
   -moz-box-sizing: content-box;
   padding-top: 3px;
   padding-bottom: 2px;
}


      </style> 
 </head> 
 <body> 
  <form ...> 
   <button>Login</button> 
   <a href="..." class="button">Register</a> 
  </form>  
 </body>
</html>

Related Tutorials