Highlight clicked anchor button - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Button

Description

Highlight clicked anchor button

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">
a {<!--   w w w  .j  a va2  s . com-->
   display:block;
   width:116px;
   height:26px;
   background:Chartreuse;
   padding:11px;
   text-align:center;
   border-radius:6px;
   color:yellow;
   font-weight:bold;
}

a:focus {
   font-size:19px;
   border:3px solid blue;
   width:116px;
   height:26px;
}

a:target {
   font-size:19px;
   border:3px solid pink;
   width:116px;
   height:26px;
}
</style> 
 </head> 
 <body> 
  <a id="btn" href="#btn">Demo</a> 
  <a id="btn2" href="#btn2">Demo 2</a>  
 </body>
</html>

Related Tutorials