How to create icon hover effect using CSS ? Last Updated : 10 Oct, 2024 Summarize Comments Improve Suggest changes Share Like Article Like Report To style an icon's color, size, and shadow using CSS, use the color property to set the icon's color, font size to adjust its size, and text-shadow or box-shadow for adding shadow effects, creating a visually appealing and dynamic look.Using: hover Pseudo-ClassUsing the: hover pseudo-class, you can apply styles like transformations or color changes when an element is hovered over. It's triggered when the user hovers over the element, creating interactive visual effects.Syntaxselector:pseudo-class { property: value;}Example: We have used the: hover selector and a combination of various CSS to create a hover effect on social media icons. This project will surely help you understand the hover effect on a deeper level. HTML <!DOCTYPE html> <html lang="en" dir="ltr"> <head> <meta charset="utf-8"> <script src= "https://kit.fontawesome.com/457a315592.js" crossorigin="anonymous"> </script> <style> .container { background-color: green; height: 20vh; display: flex; justify-content: center; align-items: center; } .link { height: 70px; width: 70px; background-color: #caf7e3; border-radius: 35px; text-align: center; margin: 7px; line-height: 80px; } a i { transition: all 0.3s linear; } a:hover i { transform: scale(1.5); } .youtube:hover { color: red; } .facebook:hover { color: blue; } .instagram:hover { color: #e11d74; } .twitter:hover { color: #00adb5; } .github:hover { color: black; } .linkedin:hover { color: #04009a; } </style> </head> <body> <p>GFG social media link icons (Hover over the icon)</p> <div class="container"> <a class="link linkedin"> <i class="fab fa-2x fa-linkedin"></i> </a> <a class="link twitter"> <i class="fab fa-2x fa-twitter"></i> </a> <a class="link github"> <i class="fab fa-2x fa-github"></i> </a> <a class="link instagram"> <i class="fab fa-2x fa-instagram"></i> </a> <a class="link youtube"> <i class="fab fa-2x fa-youtube"></i> </a> <a class="link facebook"> <i class="fab fa-2x fa-facebook-f"></i> </a> </div> </body> </html> Output: Comment More infoAdvertise with us Next Article How to create icon hover effect using CSS ? A arindey Follow Improve Article Tags : Web Technologies CSS CSS-Questions Similar Reads How to create image overlay hover slide effects using CSS ? In this article, we will learn how to make image overlay hover slide effects using CSS. When the users hover over the image, a smooth sliding overlay effect occurs. This technique gives a visual appeal with interactivity, making your website more interactive.Table of ContentFull Width Slide-In Text 4 min read How to create an Image Overlay Zoom Effect on hover using CSS ? Image Overlay Zoom Effect on hover can be done by using CSS. This effect is used in web design for user attention to images by highlighting the content or text, and to improve the overall look of a website by adding dynamic visual effects. We have given a Zoom effect to the text and image when the u 2 min read How to create button hover animation effect using CSS ? Minimal rotating backdrop button hovers and click animation is a basic CSS animation effect where when the button hovers, the button's background color changes, and when the button is clicked, it scales down slightly. This animation is implemented using CSS pseudo-elements and transitions. The ::sel 3 min read How to apply Hover Effect in CSS? The :hover pseudo-class in CSS is used for styling when an element is hovered over by a cursor. Syntaxa:hover { // CSS Styles...}HTML<!DOCTYPE html> <html> <head> <style> .hover-button { background-color: #4CAF50; padding: 15px 30px; font-size: 16px; cursor: pointer; } .hover 1 min read How to make Profile Card Hover Effect using CSS ? Almost all of us must have heard that 'the first impression is the last impression'. The profile card carries the most important details we should know about a person at the very first instant. A better impression attracts more traffic. So to engage more audience in a website it is very important to 3 min read Like