Social Icons
HTML CODE :-
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==" crossorigin="anonymous" referrerpolicy="no-referrer" /> <title></title> </head> <body> <div class="container"> <div class="icon facebook"> <i class="fa-brands fa-facebook"></i> <span>Facebook</span> </div> <div class="icon youtube"> <i class="fa-brands fa-youtube"></i> <span>Youtube</span> </div> <div class="icon instagram"> <i class="fa-brands fa-instagram"></i> <span>Instagram</span> </div> <div class="icon twitter"> <i class="fa-brands fa-twitter"></i> <span>Twitter</span> </div> </div> </body> </html> |
CSS CODE :-
body{ padding: 0px; margin: 0px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; min-height: 100vh; background-color: #F9F9F8; } .container{ width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; } .icon{ width: 50px; height: 50px; border-radius: 100px; margin: 20px; text-align: center; background-color: #fff; font-size: 25px; line-height: 50px; overflow: hidden; color: white; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; transition: all 0.4s ease-out; } .icon:hover{ width: 200px; cursor: pointer; display: flex; align-items: center; justify-content:space-evenly; color: white; } .icon:hover i{ color: white; } .facebook i{ color: #028fb5; } .facebook:hover{ background-color:#028fb5; } .youtube i{ color: #f23602; } .youtube:hover{ background-color:#f23602; } .instagram i{ color:#c04b65; } .instagram:hover{ background-color:#c04b65; } .twitter i{ color:#8dd4fc; } .twitter:hover{ background-color:#8dd4fc; } |