How to Create Glowing Social Media Icons
With HTML & CSS
Video Tutorial of Glowing Social Media Icons
Glowing Social Media Icons [Source Codes]
To Create Glowing Social Media Icons with HTML and CSS, follow the given steps line by line:
Create a folder. You can name this folder whatever you want, and inside this folder, create the mentioned files.
Create an index.html file. The file name must be index and its extension .html
Create a style.css file. The file name must be style and its extension .css
Once you create these files, paste the given codes into the specified files. If you don’t want to do these then scroll down and download the source code by clicking download button.
First, paste the following codes into your index.html file
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>Glowing Social Icons</title>
- <link rel="stylesheet" href="style.css">
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
- </head>
- <body>
- <ul>
- <li><i class="fab fa-facebook-f"></i></li>
- <li><i class="fab fa-twitter"></i></li>
- <li><i class="fab fa-instagram"></i></li>
- <li><i class="fab fa-linkedin-in"></i></li>
- <li><i class="fab fa-youtube"></i></li>
- </ul>
- </body>
- </html>
Now paste the following codes into your style.css file
- *{
- margin: 0;
- padding: 0;
- list-style: none;
- }
- body{
- display: flex;
- height: 100vh;
- text-align: center;
- align-items: center;
- justify-content: center;
- background: #282A35;
- }
- ul{
- display: flex;
- }
- ul li{
- position: relative;
- display: block;
- color: #666;
- font-size: 30px;
- height: 60px;
- width: 60px;
- background: #303030;
- line-height: 60px;
- border-radius: 50%;
- margin: 0 15px;
- cursor: pointer;
- transition: .5s;
- }
- ul li:before{
- position: absolute;
- content: '';
- top: 0;
- left: 0;
- height: inherit;
- width: inherit;
- /* background: #d35400; */
- border-radius: 50%;
- transform: scale(.9);
- z-index: -1;
- transition: .5s;
- }
- ul li:nth-child(1):before{
- background: #4267B2;
- }
- ul li:nth-child(2):before{
- background: #1DA1F2;
- }
- ul li:nth-child(3):before{
- background: #E1306C;
- }
- ul li:nth-child(4):before{
- background: #2867B2;
- }
- ul li:nth-child(5):before{
- background: #ff0000;
- }
- ul li:hover:before{
- filter: blur(3px);
- transform: scale(1.2);
- /* box-shadow: 0 0 15px #d35400; */
- }
- ul li:nth-child(1):hover:before{
- background: linear-gradient(90deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4);
- }
- ul li:nth-child(2):hover:before{
- box-shadow: 0 0 15px #1DA1F2;
- background: linear-gradient(90deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4);
- }
- ul li:nth-child(3):hover:before{
- box-shadow: 0 0 15px #E1306C;
- background: linear-gradient(90deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4);
- }
- ul li:nth-child(4):hover:before{
- box-shadow: 0 0 15px #2867B2;
- background: linear-gradient(90deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4);
- }
- ul li:nth-child(5):hover:before{
- box-shadow: 0 0 15px #ff0000;
- background: linear-gradient(90deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4);
- }
- ul li:nth-child(1):hover{
- color: #456cba;
- box-shadow: 0 0 15px #4267B2;
- text-shadow: 0 0 15px #4267B2;
-
- }
- ul li:nth-child(2):hover{
- color: #26a4f2;
- box-shadow: 0 0 15px #1DA1F2;
- text-shadow: 0 0 15px #1DA1F2;
-
- }
- ul li:nth-child(3):hover{
- color: #e23670;
- box-shadow: 0 0 15px #E1306C;
- text-shadow: 0 0 15px #E1306C;
-
- }
- ul li:nth-child(4):hover{
- color: #2a6cbb;
- box-shadow: 0 0 15px #2867B2;
- text-shadow: 0 0 15px #2867B2;
-
- }
- ul li:nth-child(5):hover{
- color: #ff1a1a;
- box-shadow: 0 0 15px #ff0000;
- text-shadow: 0 0 15px #ff0000;
-
- }
- /* ul li:hover{
- color: #ffa502;
- box-shadow: 0 0 15px #d35400;
- text-shadow: 0 0 15px #d35400;
- } */
If you face any difficulties while creating your Glowing Social Media Icons or your code is not working as expected, you can download the source code files by clicking on the download button.