Mohamedgad Posted March 26, 2021 Share Posted March 26, 2021 hello, code is working as I want but I want the <img> to be hidden on page refresh as I set it inside CCS with opacity:0 and then turned to opacity:1 when hover on the div which it did , but the page it self on first refresh is Displayed the image and it should be hidden. See the Pen bGgpGzM by Mohamed-Gad (@Mohamed-Gad) on CodePen Link to comment Share on other sites More sharing options...
Carl Posted March 26, 2021 Share Posted March 26, 2021 hmm, it appears your image wasn't loading in your pen. your code was doing what it was supposed to. the opacity of the image was 0 until the tween ran. i'm guessing you want your tween to be initially paused on page load and only shown when you mouseover? See the Pen jOyqPNP?editors=1010 by snorkltv (@snorkltv) on CodePen 4 Link to comment Share on other sites More sharing options...
Mohamedgad Posted March 26, 2021 Author Share Posted March 26, 2021 on page refresh I want it to invisible. then when I hover over the div it get visible. the img now broken for some reason don't know why but when u refresh the page u will see it appear even with opacity : 0 inside CSS. its simple code but i will add more animation but its appear like that so i want to fix it before go on with other stuff Link to comment Share on other sites More sharing options...
Mohamedgad Posted March 26, 2021 Author Share Posted March 26, 2021 its not react with me like that let me check aging ur code Link to comment Share on other sites More sharing options...
Mohamedgad Posted March 26, 2021 Author Share Posted March 26, 2021 ah u added paused :true ok that's what i was looking for , thank u a lot Carl. sorry I'm still beginner. Link to comment Share on other sites More sharing options...
Carl Posted March 26, 2021 Share Posted March 26, 2021 No problem, that’s why we’re here. Glad the solution helped. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now