/    Sign up×
Community /Pin to ProfileBookmark

Animation on button hover

Why does my animation not work when hovering on the button.
https://codepen.io/raul-rogojan/pen/qBWQzVb

I am trying to achieve something like this site has.
https://promo.antrenortenis.com/mihai.html?fbclid=IwAR3a7e0qwkHkWkF8mhZCiIpi6H1T06tk5L9ePw97JuHAvIO9XNx7_2L2CbA

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@SempervivumSep 20.2019 — `form button:hover ~ form button::after {</C><br/>
<C>
~</C> is the sibling operator, the selector above adresses the next sibling form of a form which doesn't exist as there is only one form.<br/>
Change it to this and it will work:<br/>
<C>
form button:hover::after {`


BTW: It works but it is confusing if the keyframes are defined in a descending order.
Copy linkTweet thisAlerts:
@codyhillauthorSep 21.2019 — @Sempervivum#1608940 Thx, I made it work now. The problem I have is that I don't know how to make it reverse when I remove the mouse.

https://codepen.io/raul-rogojan/pen/qBWQzVb - Here is what I have so far.

https://promo.antrenortenis.com/mihai.html?fbclid=IwAR3a7e0qwkHkWkF8mhZCiIpi6H1T06tk5L9ePw97JuHAvIO9XNx7_2L2CbA - Here is how I wanted it to look. You can see the difference.
Copy linkTweet thisAlerts:
@siddhi_patelSep 24.2019 — Hii

form button:hover ~ form button::after {

~ is the sibling operator, the selector above address the next sibling form of a form which doesn't exist as there is only one form.

Change it to this and it will work:

form button:hover::after {}
×

Success!

Help @codyhill spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.24,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...