Slanted Edge Buttons via anchor - HTML CSS CSS Form

HTML CSS examples for CSS Form:input button style

Description

Slanted Edge Buttons via anchor

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">

.button {<!--from   w w  w.ja  va  2  s  .c  o m-->
   background: #EEE;
   display: block;
   color: #000;
   font-family: sans-serif;
   font-size: 16px;
   font-weight: normal;
   margin: 0 30px 20px 0;
   padding: 20px;
   position: relative;
   text-decoration: none;
   transition: background 0.25s;
}
.button.triangle:after {
   content: "";
   background-color: red;
   display: block;
   height: 100%;
   position: absolute;
   right: -30px;
   top: 0;
   width: 60px;
   transform: skewX(-10deg);
}


      </style> 
 </head> 
 <body> 
  <a class="button triangle" href="#"> this is a triangle button! </a> 
  <a class="button triangle" href="#"> this is a triangle button <br> with multiple lines! <br> more </a> 
  <a class="button triangle" href="#"> this is a triangle button <br> with multiple lines! <br> more this is a triangle button <br> with multiple lines! <br> more </a> 
  <a class="button triangle" href="#"> this is a triangle button <br> with multiple lines! <br> more this is a triangle button <br> with multiple lines! <br> more this is a triangle button <br> with multiple lines! <br> more this is a triangle button <br> with multiple lines! <br> more </a>  
 </body>
</html>

Related Tutorials