|
| 1 | +* { |
| 2 | + margin: 0; |
| 3 | + padding: 0; |
| 4 | + font-size: calc(10px + 2vw); |
| 5 | + |
| 6 | + font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif, serif; |
| 7 | + overflow: hidden; |
| 8 | + |
| 9 | +} |
| 10 | +body { |
| 11 | + height: 100vh; |
| 12 | + width: 100vw; |
| 13 | + display: flex; |
| 14 | + justify-content: flex-start; |
| 15 | + align-items: center; |
| 16 | + flex-direction: column; |
| 17 | + background-color: black; |
| 18 | + color: #fff; |
| 19 | + |
| 20 | + |
| 21 | +} |
| 22 | +.transition1 { |
| 23 | + border: 2px solid black; |
| 24 | + height: 12vmin; |
| 25 | + width: max-content; |
| 26 | + display: flex; |
| 27 | + align-items: center; |
| 28 | + justify-content: flex-start; |
| 29 | + margin-left: 20px; |
| 30 | + margin-top: 20px; |
| 31 | +} |
| 32 | +.text1 { |
| 33 | + border: 2px solid black; |
| 34 | + border-right: 2px solid orange; |
| 35 | + width: 2px; |
| 36 | + overflow: hidden; |
| 37 | + animation: effect 5s steps(9) infinite forwards, blink 0.5s linear infinite; |
| 38 | +} |
| 39 | +@keyframes blink { |
| 40 | + from, |
| 41 | + to { |
| 42 | + border-right: 1px solid transparent; |
| 43 | + } |
| 44 | + 50% { |
| 45 | + border-right: 1px solid orange; |
| 46 | + } |
| 47 | +} |
| 48 | +@keyframes effect { |
| 49 | + from, |
| 50 | + to { |
| 51 | + width: 0; |
| 52 | + } |
| 53 | + 50% { |
| 54 | + width: 100%; |
| 55 | + } |
| 56 | +} |
| 57 | + |
| 58 | +.transition2 { |
| 59 | + border: 2px solid black; |
| 60 | + height: 10vmin; |
| 61 | + width: 35vmin; |
| 62 | + margin: 10px; |
| 63 | + position: relative; |
| 64 | +} |
| 65 | +.text2 { |
| 66 | + position: absolute; |
| 67 | + transform: translate(-150px, -40px); |
| 68 | + animation: trans 4s ease-in infinite; |
| 69 | +} |
| 70 | + |
| 71 | +@keyframes trans { |
| 72 | + 0% { |
| 73 | + transform: translate(-150px, -20px); |
| 74 | + opacity: 0; |
| 75 | + } |
| 76 | + 40% { |
| 77 | + transform: translate(0px, 0px); |
| 78 | + opacity: 1; |
| 79 | + } |
| 80 | + 80% { |
| 81 | + transform: translate(0px, 0px); |
| 82 | + } |
| 83 | + 100% { |
| 84 | + transform: translate(-200px, 0px); |
| 85 | + } |
| 86 | +} |
| 87 | + |
| 88 | +.transition3 { |
| 89 | + border: 2px solid black; |
| 90 | + height: min-content; |
| 91 | + width: 40vmin; |
| 92 | + display: flex; |
| 93 | + padding: 10px; |
| 94 | + justify-content: space-evenly; |
| 95 | + position: relative; |
| 96 | +} |
| 97 | +.text3 { |
| 98 | + border: 2px solid black; |
| 99 | + list-style: none; |
| 100 | + height: 6vmin; |
| 101 | + width: max-content; |
| 102 | +} |
| 103 | +.text3 li { |
| 104 | + animation: dtrans 20s ease infinite forwards; |
| 105 | +} |
| 106 | +.text3 li:first-child { |
| 107 | + transition-delay: 2s; |
| 108 | +} |
| 109 | + |
| 110 | +@keyframes dtrans { |
| 111 | + 0% { |
| 112 | + animation-play-state: paused; |
| 113 | + } |
| 114 | + 2% { |
| 115 | + transform: translate3d(0, 0, 0); |
| 116 | + } |
| 117 | + 7.14% { |
| 118 | + transform: translate3d(0px, -45px, 0px); |
| 119 | + } |
| 120 | + 14.28% { |
| 121 | + animation-play-state: paused; |
| 122 | + } |
| 123 | + 21.42% { |
| 124 | + transform: translate3d(0px, -90px, 0px); |
| 125 | + } |
| 126 | + 28.56% { |
| 127 | + animation-play-state: paused; |
| 128 | + } |
| 129 | + 35.7% { |
| 130 | + transform: translate3d(0px, -135px, 0px); |
| 131 | + } |
| 132 | + 42.84% { |
| 133 | + animation-play-state: paused; |
| 134 | + } |
| 135 | + 49.98% { |
| 136 | + transform: translate3d(0px, -180px, 0px); |
| 137 | + } |
| 138 | + 57.12% { |
| 139 | + animation-play-state: paused; |
| 140 | + } |
| 141 | + 64.26% { |
| 142 | + transform: translate3d(0px, -135px, 0px); |
| 143 | + } |
| 144 | + 71.4% { |
| 145 | + animation-play-state: paused; |
| 146 | + } |
| 147 | + 78.54% { |
| 148 | + transform: translate3d(0px, -90px, 0px); |
| 149 | + } |
| 150 | + 85.68% { |
| 151 | + animation-play-state: paused; |
| 152 | + } |
| 153 | + 92.82% { |
| 154 | + transform: translate3d(0px, -45px, 0px); |
| 155 | + } |
| 156 | + 100% { |
| 157 | + transform: translate3d(0, 0, 0); |
| 158 | + } |
| 159 | +} |
| 160 | + |
| 161 | +.hover-effect { |
| 162 | + border: 2px solid black; |
| 163 | + margin-top: 10px; |
| 164 | + height: 10vh; |
| 165 | + width: 60vmin; |
| 166 | + background-clip: text; |
| 167 | + padding: 10px; |
| 168 | + display: flex; |
| 169 | + justify-content: center; |
| 170 | + align-items: center; |
| 171 | +} |
| 172 | +.effect { |
| 173 | + font-size: calc(10px + 3vw); |
| 174 | + padding: 12px 48px; |
| 175 | + color: #ffffff; |
| 176 | + background: linear-gradient(to right, #4d4d4d 0, white 10%, #4d4d4d 20%); |
| 177 | + background-position: 0; |
| 178 | + background-clip: text; |
| 179 | + -webkit-text-fill-color: transparent; |
| 180 | + animation: shine 3s infinite linear forwards; |
| 181 | + font-weight: 600; |
| 182 | +} |
| 183 | +@keyframes shine { |
| 184 | + 0% { |
| 185 | + background-position: 0; |
| 186 | + } |
| 187 | + 60% { |
| 188 | + background-position: 200px; |
| 189 | + } |
| 190 | + 100% { |
| 191 | + background-position: 280px; |
| 192 | + } |
| 193 | +} |
0 commit comments