Button Hover Effect | HTML & CSS

preview_player
Показать описание
// Button Hover Effect Using HTML And CSS //

---------------- Social Media ----------------

Music :
Uplink - To Myself (feat. NK) [NCS Release]
Uplink

NK

Ship Wrek & Zookeepers - Ark [NCS Release]
Shipwrek

Zookeepers
Рекомендации по теме
Комментарии
Автор

These are some of the books that can help you learn web designing -





codegrid
Автор

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

body {
height: 100vh;
background: #151519;
}

button {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50, -50);
}

button {
background: none;
color: #ccc;
width: 240px;
height: 80px;
border: 1px solid #338033;
font-size: 18px;
border-radius: 4px;
transition: .6s;
overflow: hidden;
}

button:focus {
outline: none;
}

button:before {
content: '';
display: block;
position: absolute;
background: rgba(255, 255, 255, .5);
width: 60px;
height: 100%;
left: 0;
top: 0;
opacity: .5;
filter: blur(30px);
transform: translateX(-130px) skewX(-15deg);
}

button:after {
content: '';
display: block;
position: absolute;
background: rgba(255, 255, 255, .2);
width: 30px;
height: 100%;
left: 30px;
top: 0;
opacity: 0;
filter: blur(30px);
transform: translateX(-100px) scaleX(-15deg);
}

button:hover {
background: #338033;
cursor: pointer;
}

button:hover:before {
transform: translateX(300px) skewX(-15deg);
opacity: .6;
transition: .7s;
}

button:hover:after {
transform: translateX(300px) skewX(-15deg);
opacity: 1;
transition: .7s;
}

wolkenherrscher
Автор

I don't know who are you, but let me tell you that you are amazing, really thanks for the tutorials :)

betflozcode
Автор

<html>
<head>
<style>
html, body {
margin: 0;
padding: 0;
width:100%;
}
body {
height:100vh;
background: #151519;
}
button{
position:absolute;
top:50%;
left:50%;
transform: translate(-50%, -50%)
}
button {
background: none;
color: #ccc;
width: 240px;
height: 80px;
border: 1px solid #338033;
font-size: 18px;
border-radius: 4px;
transition: .6s;
overflow: hidden;
}
button:focus{
outline:none;
}
button:before{
content: '';
display: block;
position: absolute;
background: rgba(255, 255, 255, .5);
width: 60px;
height: 100%;
left: 0;
top: 0;
opacity: .5;
filter: blur(30px);
transform: translateX(-130px) skewX(-15deg);
}

button:after{
content: '';
display: block;
position: absolute;
background: rgba(255, 255, 255, .2);
width: 30px;
height: 100%;
left: 30px;
top: 0;
opacity: 0;
filter: blur(30px);
transform: translate(-100px) scaleX(-15deg);
}
button:hover {
background: #338033;
cursor:pointer;
}

button:hover:before {
transform: translateX(300px) skewX(-15deg);
opacity: .6;
transition: .7s;
}

button:hover:after {
transform: translateX(300px) skewX(-15deg);
opacity: 1;
transition: .7s;
}
</style>
</head>
<body>
<div class="wrapper">
<div class="btn">
<button type="button"> Hover me </button>
</div>
</div>
</body>

</html>

AhsanHabibOvi
Автор

it feels awesome to learn from ur vids, espacially music tracks makes my mind clear and ready to learn somethin awesome....thanks bro.

coolmachine
Автор

Hey, thanks for this! This is very helpful and educational! I look forward to seeing more of your videos! Just a suggestion, ditch the club music and perform a voice-over narration to give your vids a more personal touch. Anyway, you just earned a new subscriber! :)

gammaechofoundationproductions
Автор

damn i love your content, pls dont stop making videos :3

masterdon
Автор

after watching numeorus hover effect, finally this one worked. properly.. thankyou so much

manitarai
Автор

Good content mate, keep up the good work!

legioncoding
Автор

Thanks. I learn a lots from your videos, nice and clean effects for UX and straight to the point explanation.

WehrmachtSoldier
Автор

You are awesome ❣️ But I have one suggestion that please try to use inspect element for better understanding.., .!

mehul.soni.
Автор

I don't know who are you but you are best

Автор

wrapper and btn class wasnt used neither the div tags, you can remove div tags and still it would work same.

knlkumar
Автор

Why you use twice "button" propertie ? One overwrite another, right?

neo_riderYt
Автор

Excellent content we'll done! Just one question: what library or framework are you using?

omarawad
Автор

Thank you so much, this is great. One question though. Your hover button has some shiny effect when hovering over. I don't have that. How did you get it?

swaraagsistla
Автор

:before{
content: '';
display: block;
position: absolute;
background: rgba(255, 255, 255, .5);
width: 60px;
height: 100%;
left: 0;
top: 0;
opacity: .5;
filter: blur(30px);
transform: translateX(-130px) skewX(-15deg);
}

:after{
content: '';
display: block;
position: absolute;
background: rgba(255, 255, 255, .2);
width: 30px;
height: 100%;
left: 30px;
top: 0;
opacity: 0;
filter: blur(30px);
transform: translateX(-100px) scaleX(-15deg);
}

:hover:before {
transform: translateX(300px) skewX(-15deg);
opacity: .6;
transition: .7s;
}

:hover:after {
transform: translateX(300px) skewX(-15deg);
opacity: 1;
transition: .7s;
}

TearMaker
Автор

For some reason the shining light thingy is in the top left corner of my button? Instead of being in the button. I don't know hot to explain it exactly but it looks off.

Fevr
Автор

why do you around the class="btn" another on class="wrapper"?

bickelmeister
Автор

The video was good, but it will not be suitable for Beginners. For each code in HTML, it is better to toggle to web page to see the real time changes. Then only people will understand purpose of each lines.

siddhartht