1+ * {
2+ margin : 0 ;
3+ padding : 0 ;
4+ }
5+ body {
6+ background : # 000 ;
7+ height : 100vh ;
8+ display : flex;
9+ justify-content : center;
10+ align-items : center;
11+ }
12+ .circle {
13+ position : absolute;
14+ width : 300px ;
15+ height : 300px ;
16+ border-radius : 50% ;
17+ top : 50% ;
18+ left : 50% ;
19+ transform : translate (-50% , -50% );
20+ background-color : # ff4d4d ;
21+ box-shadow : 0 0 20px rgb (224 , 13 , 13 );
22+ animation : animate 2s linear forwards infinite;
23+ transition : transform 0.3s ease, box-shadow 0.3s ease;
24+ }
25+ .circle h1 {
26+ position : absolute;
27+ top : 50% ;
28+ left : 50% ;
29+ transform : translate (-50% , -50% );
30+ z-index : 2 ;
31+ color : # fff ;
32+ font-size : 40px ;
33+ font-family : 'Segoe UI' , Tahoma, Geneva, Verdana, sans-serif;
34+ text-shadow :
35+ 0 0 5px # fff, /* This makes the text feel like part of the neon system. */
36+ 2px 3px 5px rgb (224 , 13 , 13 );
37+ }
38+ .circle ::after {
39+ content : '' ;
40+ position : absolute;
41+ top : 10px ;
42+ right : 10px ;
43+ left : 10px ;
44+ bottom : 10px ;
45+ background-color : # 1a0000 ;
46+ border-radius : 50% ;
47+ background : radial-gradient (circle, # 330000 0% , # 1a0000 70% , # 0a0000 100% ); /* This gives the illusion of light spilling inward. */
48+ }
49+
50+ .circle : hover {
51+ box-shadow : 0 0 20px rgb (224 , 13 , 13 ), 0 0 40px rgb (224 , 13 , 13 );
52+ transform : translate (-50% , -50% ) scale (1.05 );
53+ cursor : pointer;
54+ }
55+
56+ @keyframes animate {
57+ 0% {
58+ box-shadow : 0 0 20px rgb (224 , 13 , 13 ), 0 0 40px rgb (224 , 13 , 13 );
59+ }
60+ 70% {
61+ box-shadow : 0 0 30px rgb (224 , 13 , 13 ), 0 0 60px rgb (224 , 13 , 13 ), 0 0 100px rgb (224 , 13 , 13 );
62+ }
63+ 100% {
64+ box-shadow : 0 0 20px rgb (224 , 13 , 13 ), 0 0 40px rgb (224 , 13 , 13 );
65+ }
66+ }
0 commit comments