Friday, October 11, 2019

Glowing Gradient Button in HTML and CSS

 In this article, I would like to share the code written by my friend and fellow software engineer sir Ernel Fadriquilan

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.



Sample Program Output


Program Listing

index.html

<html>
<head>
<title>Glowing Gradient Button</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<a href="#">Button</a>
</body>
</html>

style.css

body
{
margin:0;
padding:0;
background:#000;
}
a{
position:absolute;
top:50%;
Left:50%;
transform:translate(-50%,-50%);
width:200px;
heigth:60px;
text-align:center;
Line-height:60px;
color:#fff;
font-size:24px;
text-transform:uppercase;
text-decoration:none;
font-family:sans-serif;
box-sizing:border-box;
background:linear-gradient(90deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4);
background-size:400%;
border-radius:30px;
z-index:1;
}
a:hover
{
animation:animate 8s linear infinite;
}
@keyframes animate
{
0%
{
background-position:0%;
}
100%
{
background-position:400%;
}
}
a:before
{
content: '';
position:absolute;
top:-5px;
Left:-5px;
right:-5px;
bottom:-5px;
z-index:-1;
background:linear-gradient(90deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4);
background-size:400%;
border-radius:40px;
opacity:0;
transition: 0.5s;
}
a:hover:before
{
filter:blur(20px);
opacity:1;
animation:animate 8s linear infinite;
}

No comments:

Post a Comment