how to make stylish btn in html css

HOW TO MAKE STYLISH BUTTON IN HTML WEBPAGE USING CSS



  • CREATE HTML PAGE .
  • CREATE DIVISION IN HTML BODY TAG
  • DIV CLASS ADD
  • GIVE STYLE IN STYLE TAG, WE CREATE IN HEAD TAG .
Code

CSS:
@font-face {
font-family: "open";
font-style: normal;
font-weight: 300;
src: local("Open Sans Light"), local("OpenSans-Light"), url(https://themes.googleusercontent.com/static/fonts/opensans/v6/DXI1ORHCpsQm3Vp6mXoaTZ1r3JsPcQLi8jytr04NNhU.woff) format('woff');
}

*, *:before, *:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}

html, body {
padding: 0;
margin: 0;
width: 100%;
height: 100%;
}

a {
display: block;
margin: auto;
margin-top: 50px;
text-decoration: none;
color: inherit;
}

@keyframes linear {

from {
background-position: 0 0;
}
to {
background-position: 200px 0;
}

}

@keyframes radial {

from {
background-position: 0 0;
}
to {
background-position: 0 60px;
}

}

@keyframes repeating {

from {
background-position: 0 0;
}
to {
background-position: 0 85px;
}

}

@keyframes electronic {

0%, 100% {
background-position: 20px -30px;
}
25% {
background-position: 150px 5px;
}
50% {
background-position: 20px 40px;
}
75% {
background-position: -100px 5px;
}

}

.cmptbtn {
width: 200px;
padding: 20px;
text-align: center;
position: relative;
background: #fff;
color: #333;
font: 13px open, tahoma;
}
.cmptbtn:before {
content: '';
display: block;
height: 100%;
width: 100%;
border-radius: 3px;
transform: scale( 1.02, 1.08 );
position: absolute;
background: #f00;
background: linear-gradient( 90deg, #fafafa, #fafafa, #1D8EF7, #fafafa, #fafafa );
background-position: 55px 0;
top: 0;
animation: linear 1s infinite linear;
left: 0;
z-index: -1;
}

.cmptbtn.radial:before {
background: radial-gradient( #fafafa, #fafafa, #F2A61A, #fafafa, #fafafa );
animation: radial 1s infinite linear;
}

.cmptbtn.repeating:before {
background: repeating-linear-gradient( -45deg, #fafafa, #fafafa 30px, #5FC914 30px, #5FC914 60px ) fixed;
animation: repeating 1s infinite linear;
}

.cmptbtn.electronic:before {
background: radial-gradient( #EA238D, #EA238D, #EA238D, #EA238D, #fafafa, #fafafa ) no-repeat;
background-size: 150px 50px;
animation: electronic 2s infinite linear;
}


HTML: code


<a href="#" class="cmptbtn electronic">How to use HTML css</a>
<a href="#" class="cmptbtn repeating">How to use HTML css</a>
<a href="#" class="cmptbtn">How to use HTML css</a>
<a href="#" class="cmptbtn radial">How to use HTML css</a>

style in button
How to make style in button


Comments