Hello devs!👋 Today I'll be sharing some cool icons with glow effect using HTML and CSS only 😍.
I am Aaditya, sharing some useful and interesting projects here. You can follow me on my Instagram handle @_foxstack_.
Preview of project:
So let's proceed towards it's development. First I have provided HTML and then CSS. I have also given CodePen link to make your task easier. 😀
HTML (index.html):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>CSS glowing icons</title> <link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> </head> <body> <div class="container"> <i class="fa fa-apple" id="apple"></i> <i class="fa fa-twitter" id="twitter"></i> <i class="fa fa-github-square github" id="github"></i> <i class="fa fa-facebook-square" id="facebook"></i> </div> </body> </html> |
CSS (style.css):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | * { margin: 0; padding: 0; } body { height: 100vh; width: 100vw; background: #18191f; } .container { display: flex; justify-content: center; align-items: center; height: 100vh; width: 100vw; } #apple, #twitter, #github, #facebook { font-size: 8em; background-color: #18191f; color: #fff; box-shadow: 2px 2px 2px #00000080, 10px 1px 12px #00000080, 2px 2px 10px #00000080, 2px 2px 3px #00000080, inset 2px 2px 10px #00000080, inset 2px 2px 10px #00000080, inset 2px 2px 10px #00000080, inset 2px 2px 10px #00000080; border-radius: 29px; padding: 11px 19px; margin: 0 40px; animation: animate 3s linear infinite; text-shadow: 0 0 50px #0072ff, 0 0 100px #0072ff, 0 0 150px #0072ff, 0 0 200px #0072ff; } #twitter { animation-delay: 0.3s; } #facebook { animation-delay: 0.7s; } #github { animation-delay: 0.1s; } @keyframes animate { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(360deg); } } |
License:
-------------------------------------------------------------------------------------------
The MIT License (MIT)
Copyright (c) 2022 by Krishna Gupta (https://codepen.io/Krishnaa_Gupta/pen/MWoRqmr)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
------------------------------------------------------------------------------------------------