How To Create A Gradation Effect On A Button?

How To Create A Gradation Effect On A Button?
In This tutorial will discuss an example of an effect created by CSS3, namely how to create a gradient effect on a button . Gradation is a very interesting color combination so that the gradient effect is one of the most widely used effects in website page designs today, one example that I will share with you is the use of the color gradient effect on the button element.

For those of you who are curious about how to make it, there is nothing wrong with listening and at the same time following the steps below.

To create a gradient effect this time, of course, the element we will use is the button element, please create and type it like the following syntax.
<body>
<button class = "btn btn-flex"> </button>
</body>
After creating the button element as above, next is to design and adjust the button element and of course create a color gradient effect on the button, please type in the CSS3 syntax as follows.
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background-color: # 000000;
background-image: linear-gradient (147deg, # 000000 0%, # 232323 74%);
}
.btn-flex {
display: flex;
align-items: center;
justify-content: center;
}
.btn {
user-select: none;
}
button {
width: 150px;
height: 50px;
cursor: pointer;
border: none;
border-radius: 25px;
background-color: # 50d8d7;
background-image: linear-gradient (316deg, # 3cb5b5 0%, # e53b51 74%);
transition: 500ms;
}
button :: after {
width: 143px;
height: 43px;
position: absolute;
display: flex;
align-items: center;
justify-content: center;
content: 'SUBMIT';
font-size: 20px;
color: #eee;
border-radius: 25px;
background-color: # 222;
transition: 500ms;
}
button: hover :: after {
font-size: 25px;
background-color: transparent;
}
button: focus {
outline: none;
}

After you have typed all the HTML and CSS syntax, please save the file then you can open it in each browser and see the results.

By adding a color gradient effect to the button element as above, it will make the style of the element look more attractive and nice. All right, that's all the eventtechy tutorial this time, hopefully the tutorial How to Make a Gradation Effect on the Button is useful, good luck and see you in the next eventtechy tutorial. Also check out other interesting articles only on eventtechy.

Comments

Popular posts from this blog

How To Change Website Background Color With CSS?

How to Make Responsive CSS Minifier Pages?