Add border when hover - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover Border

Description

Add border when hover

Demo Code

ResultView the demo in separate window

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

.parent {<!--from  w w w.j  av a2s.c  om-->
   width:300px;
   height:60px;
   padding:30px;
}
.cta {
   display: inline-block;
   padding: 10px 30px;
   font-size: 19px !important;
   background: #1d85bf;
   color:#fff;
   border:3px solid #0b527a;
   border-top:0;
   border-left: 0;
   border-radius:3px;
   text-transform:uppercase;
   display: block;
   overflow: hidden;
   white-space: nowrap;
}
.cta:hover {
   border:3px solid #dbdbdb;
   border-color:inherit !important;
   border-bottom: 0;
   border-right: 0;
   border-top-left-radius: 3px !important;
   color:#fff;
   box-shadow: #242729 6px 6px 6px;
}


      </style> 
 </head> 
 <body> 
  <div class="parent" style="background:red;"> 
   <a class="cta">BUTTON</a> 
  </div> 
  <div class="parent" style="background:green;"> 
   <a class="cta">BUTTON</a> 
  </div>  
 </body>
</html>

Related Tutorials