jsimmons01 / portfolio

Other
0 stars 0 forks source link

CSS animations #4

Open jsimmons01 opened 11 months ago

jsimmons01 commented 11 months ago

I want to add animations when a user hovers a link and possibly when the page load.

Ramghosh16RG commented 11 months ago

@jsimmons01 you can do it using css or in html

One way is

you can add animations when a user hovers a link and possibly when the page loads by using CSS pseudo-classes.

For example, you can use the :hover pseudo-class to change the style of a link when a user hovers over it. You can also use the :load pseudo-class to change the style of a link when the page loads.

Here is an example of how you can add an animation when a user hovers a link:

CSS a { text-decoration: none; color: black; }

a:hover { color: red; text-decoration: underline; animation: my-animation 0.5s ease-in-out; }

@keyframes my-animation { 0% { transform: scale(1); } 100% { transform: scale(1.1); } } Use code with caution. Learn more This code will change the color of the link to red and add an underline when a user hovers over it. It will also animate the link, scaling it up by 10% when the user hovers over it.

You can use the same technique to add animations when the page loads. For example, you could use the following code to change the background color of the page when it loads:

CSS body { background-color: white; }

body:load { background-color: blue; } Use code with caution. Learn more This code will change the background color of the page to blue when it loads.

hope it will help you!

jsimmons01 commented 11 months ago

@Ramghosh16RG Thank you! I am going to update this as soon as I get a chance. I have some other project I am working on at the time. This helps.

Ramghosh16RG commented 11 months ago

Most welcome

On Sat, Aug 5, 2023, 8:34 AM Jahmella @.***> wrote:

Thank you! I am going to update this as soon as I get a chance. I have some other project I am working on at the time. This helps.

— Reply to this email directly, view it on GitHub https://github.com/jsimmons01/portfolio/issues/4#issuecomment-1666366143, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZ35QMT5Q2JDG3H3TCQWRK3XTWZ2FANCNFSM6AAAAAA225WITE . You are receiving this because you commented.Message ID: @.***>