100+ copy-paste UI components in plain HTML and CSS: no dependencies, no build step.

0 downloads

dbbasic-web-native/test-hover-grid.html
Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/dbbasic-web-native.git
HTTPS
https://gitstable.com/git/askrobots/dbbasic-web-native.git
SSH
ssh://git@gitstable.com:2222/askrobots/dbbasic-web-native.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

danq9 Add canonical.html v1.0 - The single source of truth for usability standards fb6e650 1 year ago History
test-hover-grid.html · 8.2 KB · 245 lines
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <title>Hover Effect Grid Test</title>
7 <style>
8 body {
9 background: #1c1c1e;
10 color: #fff;
11 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
12 padding: 40px;
13 margin: 0;
14 }
15
16 .grid {
17 display: grid;
18 grid-template-columns: repeat(3, 1fr);
19 gap: 40px;
20 max-width: 1400px;
21 margin: 0 auto;
22 }
23
24 .test-box {
25 background: #2c2c2e;
26 border: 1px solid #38383a;
27 border-radius: 12px;
28 padding: 30px;
29 text-align: center;
30 }
31
32 .test-label {
33 font-size: 14px;
34 color: #8e8e93;
35 margin-bottom: 20px;
36 font-weight: 600;
37 }
38
39 .test-button {
40 background: #0066cc;
41 color: white;
42 border: none;
43 border-radius: 8px;
44 padding: 12px 24px;
45 font-size: 16px;
46 font-weight: 600;
47 cursor: pointer;
48 transition: all 0.2s;
49 min-height: 44px;
50 }
51
52 .test-description {
53 font-size: 12px;
54 color: #8e8e93;
55 margin-top: 15px;
56 line-height: 1.4;
57 }
58
59 /* Variation 1: Original dramatic (32px blur) */
60 .v1:hover {
61 transform: translateY(-4px) scale(1.05);
62 box-shadow: 0 12px 32px rgba(64, 156, 255, 0.8);
63 filter: brightness(1.4) saturate(1.3);
64 }
65
66 /* Variation 2: Refined professional (12px blur, 0.4 opacity) */
67 .v2:hover {
68 transform: translateY(-2px);
69 box-shadow: 0 4px 12px rgba(64, 156, 255, 0.4);
70 filter: brightness(1.1) saturate(1.1);
71 }
72
73 /* Variation 3: Subtle tight (8px blur, 0.3 opacity) */
74 .v3:hover {
75 transform: translateY(-1px);
76 box-shadow: 0 2px 8px rgba(64, 156, 255, 0.3);
77 filter: brightness(1.05);
78 }
79
80 /* Variation 4: Medium balanced (16px blur, 0.5 opacity) */
81 .v4:hover {
82 transform: translateY(-2px);
83 box-shadow: 0 6px 16px rgba(64, 156, 255, 0.5);
84 filter: brightness(1.15) saturate(1.15);
85 }
86
87 /* Variation 5: Tight but bright (8px blur, 0.6 opacity) */
88 .v5:hover {
89 transform: translateY(-2px);
90 box-shadow: 0 3px 8px rgba(64, 156, 255, 0.6);
91 filter: brightness(1.2);
92 }
93
94 /* Variation 6: Wide subtle (20px blur, 0.3 opacity) */
95 .v6:hover {
96 transform: translateY(-2px);
97 box-shadow: 0 8px 20px rgba(64, 156, 255, 0.3);
98 filter: brightness(1.1);
99 }
100
101 /* Variation 7: No glow, just lift and brighten */
102 .v7:hover {
103 transform: translateY(-3px);
104 box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
105 filter: brightness(1.15);
106 }
107
108 /* Variation 8: Minimal everything */
109 .v8:hover {
110 box-shadow: 0 2px 6px rgba(64, 156, 255, 0.4);
111 filter: brightness(1.08);
112 }
113
114 /* Variation 9: Strong but contained (10px blur, 0.7 opacity) */
115 .v9:hover {
116 transform: translateY(-2px);
117 box-shadow: 0 4px 10px rgba(64, 156, 255, 0.7);
118 filter: brightness(1.12) saturate(1.1);
119 }
120
121 /* Force all buttons to show hover state permanently for comparison */
122 .test-button.force-hover.v1 {
123 transform: translateY(-4px) scale(1.05);
124 box-shadow: 0 12px 32px rgba(64, 156, 255, 0.8);
125 filter: brightness(1.4) saturate(1.3);
126 }
127
128 .test-button.force-hover.v2 {
129 transform: translateY(-2px);
130 box-shadow: 0 4px 12px rgba(64, 156, 255, 0.4);
131 filter: brightness(1.1) saturate(1.1);
132 }
133
134 .test-button.force-hover.v3 {
135 transform: translateY(-1px);
136 box-shadow: 0 2px 8px rgba(64, 156, 255, 0.3);
137 filter: brightness(1.05);
138 }
139
140 .test-button.force-hover.v4 {
141 transform: translateY(-2px);
142 box-shadow: 0 6px 16px rgba(64, 156, 255, 0.5);
143 filter: brightness(1.15) saturate(1.15);
144 }
145
146 .test-button.force-hover.v5 {
147 transform: translateY(-2px);
148 box-shadow: 0 3px 8px rgba(64, 156, 255, 0.6);
149 filter: brightness(1.2);
150 }
151
152 .test-button.force-hover.v6 {
153 transform: translateY(-2px);
154 box-shadow: 0 8px 20px rgba(64, 156, 255, 0.3);
155 filter: brightness(1.1);
156 }
157
158 .test-button.force-hover.v7 {
159 transform: translateY(-3px);
160 box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
161 filter: brightness(1.15);
162 }
163
164 .test-button.force-hover.v8 {
165 box-shadow: 0 2px 6px rgba(64, 156, 255, 0.4);
166 filter: brightness(1.08);
167 }
168
169 .test-button.force-hover.v9 {
170 transform: translateY(-2px);
171 box-shadow: 0 4px 10px rgba(64, 156, 255, 0.7);
172 filter: brightness(1.12) saturate(1.1);
173 }
174 </style>
175</head>
176<body>
177 <h1 style="text-align: center; margin-bottom: 40px;">Hover Effect Variations Grid</h1>
178
179 <div class="grid">
180 <div class="test-box">
181 <div class="test-label">V1: ORIGINAL DRAMATIC</div>
182 <button class="test-button v1">Hover Me</button>
183 <div class="test-description">32px blur, 0.8 opacity<br>Scale 1.05, lift -4px<br>Brightness 1.4</div>
184 </div>
185
186 <div class="test-box">
187 <div class="test-label">V2: REFINED PROFESSIONAL</div>
188 <button class="test-button v2">Hover Me</button>
189 <div class="test-description">12px blur, 0.4 opacity<br>No scale, lift -2px<br>Brightness 1.1</div>
190 </div>
191
192 <div class="test-box">
193 <div class="test-label">V3: SUBTLE TIGHT</div>
194 <button class="test-button v3">Hover Me</button>
195 <div class="test-description">8px blur, 0.3 opacity<br>No scale, lift -1px<br>Brightness 1.05</div>
196 </div>
197
198 <div class="test-box">
199 <div class="test-label">V4: MEDIUM BALANCED</div>
200 <button class="test-button v4">Hover Me</button>
201 <div class="test-description">16px blur, 0.5 opacity<br>No scale, lift -2px<br>Brightness 1.15</div>
202 </div>
203
204 <div class="test-box">
205 <div class="test-label">V5: TIGHT BUT BRIGHT</div>
206 <button class="test-button v5">Hover Me</button>
207 <div class="test-description">8px blur, 0.6 opacity<br>No scale, lift -2px<br>Brightness 1.2</div>
208 </div>
209
210 <div class="test-box">
211 <div class="test-label">V6: WIDE SUBTLE</div>
212 <button class="test-button v6">Hover Me</button>
213 <div class="test-description">20px blur, 0.3 opacity<br>No scale, lift -2px<br>Brightness 1.1</div>
214 </div>
215
216 <div class="test-box">
217 <div class="test-label">V7: NO GLOW</div>
218 <button class="test-button v7">Hover Me</button>
219 <div class="test-description">Dark shadow only<br>No scale, lift -3px<br>Brightness 1.15</div>
220 </div>
221
222 <div class="test-box">
223 <div class="test-label">V8: MINIMAL</div>
224 <button class="test-button v8">Hover Me</button>
225 <div class="test-description">6px blur, 0.4 opacity<br>No lift, no scale<br>Brightness 1.08</div>
226 </div>
227
228 <div class="test-box">
229 <div class="test-label">V9: STRONG CONTAINED</div>
230 <button class="test-button v9">Hover Me</button>
231 <div class="test-description">10px blur, 0.7 opacity<br>No scale, lift -2px<br>Brightness 1.12</div>
232 </div>
233 </div>
234
235 <script>
236 // Force hover state on all buttons for screenshot testing
237 document.addEventListener('DOMContentLoaded', () => {
238 const buttons = document.querySelectorAll('.test-button');
239 buttons.forEach(btn => {
240 btn.classList.add('force-hover');
241 });
242 });
243 </script>
244</body>
245</html>