forked from SnippetsDevelop/snippetsdevelop.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
582 lines (576 loc) · 20.4 KB
/
index.html
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Index</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Major+Mono+Display&family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap"
rel="stylesheet"
/>
<link
rel="shortcut icon"
href="./images/symbol transparent.png"
type="image/x-icon"
/>
<link
href="https://fonts.googleapis.com/css?family=Material+Icons|Material+Icons+Outlined|Material+Icons+Two+Tone|Material+Icons+Round|Material+Icons+Sharp"
rel="stylesheet"
/>
<script
async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7648686090734646"
crossorigin="anonymous"
></script>
<link rel="stylesheet" href="./highlight/styles/vs.min.css" />
<link rel="stylesheet" href="./style.css" />
</head>
<body>
<div class="grid-container">
<label for="nbt1" class="nbt"> </label>
<input type="checkbox" name="" id="nbt1" />
<section class="nav">
<iframe src="./nav.html" frameborder="0"></iframe>
</section>
<section class="main">
<div class="main-primary">FORMS > INPUT FIELDS</div>
<div class="main-title">Different types of input styles</div>
<div class="main-content">
<div class="main-container">
<p class="text">
When it comes to designing a form in HTML, input tags play a
crucial role in capturing user input. However, styling them
effectively can enhance the form's overall look and feel, making
it more attractive and user-friendly. In this blog post, we'll
explore three simple and visually appealing designs for input tags
that you can easily implement in your HTML forms.
</p>
<p class="text">
<span class="hight">The first design</span> is a flat-style input
tag that uses simple outline with curved border and color
variations to highlight the focused input field. This design is
clean and minimal, making it perfect for modern and professional
websites.
</p>
<div class="main-box">
<div class="main-box-control">
<button
type="button"
class="main-control-btn fr-btn"
onclick="frontit(0)"
>
Output
</button>
<button
type="button"
class="main-control-btn ba-btn"
onclick="backit(0)"
>
Code
</button>
<div class="btn-line"></div>
</div>
<div class="main-box-card">
<div class="main-box-front">
<div class="design-menu">
<div class="design-title">Style 1</div>
<div class="design-colors">
<div class="color">
<div
class="color-icons"
style="background: rgb(118, 118, 118)"
></div>
<div class="color-code">rgb(118, 118, 118)</div>
</div>
<div class="color">
<div
class="color-icons"
style="background: rgb(19, 116, 214)"
></div>
<div class="color-code">rgb(19, 116, 214)</div>
</div>
</div>
</div>
<div class="main-design">
<iframe
src="./codes/input-style1.html"
frameborder="0"
class="src"
height="100%"
></iframe>
</div>
</div>
<div class="main-box-back">
<div class="design-menu">
<div class="design-title">Style 1</div>
<div class="design-colors">
<div class="color">
<div
class="color-icons"
style="background: rgb(118, 118, 118)"
></div>
<div class="color-code">rgb(118, 118, 118)</div>
</div>
<div class="color">
<div
class="color-icons"
style="background: rgb(19, 116, 214)"
></div>
<div class="color-code">rgb(19, 116, 214)</div>
</div>
</div>
</div>
<!--Place the code here-->
<pre><code class="language-html">
<style>
.input {
width: fit-content;
height: fit-content;
position: relative;
}
.inputf {
width: 300px;
height: 35px;
font-family: poppins;
border: none;
outline: 0.3mm solid rgb(118, 118, 118);
box-sizing: border-box;
padding: 0 10px;
border-radius: 1mm;
position: relative;
z-index: 1;
}
.inputf:focus {
outline: 0.7mm solid rgb(19, 116, 214);
}
.label {
font-family: poppins;
font-size: 12px;
font-weight: 500;
position: absolute;
top: 0;
left: 0;
z-index: 0;
transition: 0.25s;
color: rgb(19, 116, 214);
}
.inputf:focus + .label {
top: -20px;
}
.inputf:not(:placeholder-shown) + .label {
top: -20px;
}
.inputf:not(:placeholder-shown) {
outline: 0.7mm solid rgb(19, 116, 214);
}
</style>
<div class="input">
<input type="text" name="" id="" class="inputf" placeholder="Name" />
<span class="label">Name</span>
</div>
<!--Place the code here-->
</code></pre>
</div>
</div>
</div>
<p class="text">
<span class="hight">The second design</span> input tag, which
features a bottom border and background with sharp edges, is a
popular choice for creating a clean and modern look in HTML forms.
This design is often referred to as the "bottom border input" or
"underline input" because it only adds a border and background at
the bottom of the input field
</p>
<div class="main-box">
<div class="main-box-control">
<button
type="button"
class="main-control-btn fr-btn"
onclick="frontit(1)"
>
Output
</button>
<button
type="button"
class="main-control-btn ba-btn"
onclick="backit(1)"
>
Code
</button>
<div class="btn-line"></div>
</div>
<div class="main-box-card">
<div class="main-box-front">
<div class="design-menu">
<div class="design-title">Style 2</div>
<div class="design-colors">
<div class="color">
<div
class="color-icons"
style="background: rgb(110, 110, 110)"
></div>
<div class="color-code">rgb(110, 110, 110)</div>
</div>
<div class="color">
<div
class="color-icons"
style="background: rgb(240, 243, 246)"
></div>
<div class="color-code">rgb(240, 243, 246)</div>
</div>
<div class="color">
<div
class="color-icons"
style="background: rgb(19, 116, 214)"
></div>
<div class="color-code">rgb(19, 116, 214)</div>
</div>
<div class="color">
<div
class="color-icons"
style="background: rgb(77, 77, 77)"
></div>
<div class="color-code">rgb(77, 77, 77)</div>
</div>
</div>
</div>
<div class="main-design">
<iframe
src="./codes/input-style2.html"
frameborder="0"
class="src"
height="100%"
></iframe>
</div>
</div>
<div class="main-box-back">
<div class="design-menu">
<div class="design-title">Style 2</div>
<div class="design-colors">
<div class="color">
<div
class="color-icons"
style="background: rgb(110, 110, 110)"
></div>
<div class="color-code">rgb(110, 110, 110)</div>
</div>
<div class="color">
<div
class="color-icons"
style="background: rgb(240, 243, 246)"
></div>
<div class="color-code">rgb(240, 243, 246)</div>
</div>
<div class="color">
<div
class="color-icons"
style="background: rgb(19, 116, 214)"
></div>
<div class="color-code">rgb(19, 116, 214)</div>
</div>
<div class="color">
<div
class="color-icons"
style="background: rgb(77, 77, 77)"
></div>
<div class="color-code">rgb(77, 77, 77)</div>
</div>
</div>
</div>
<!--Place the code here-->
<pre><code class="language-html">
<style>
.input {
width: fit-content;
height: fit-content;
position: relative;
}
.inputf {
width: 300px;
height: 35px;
font-family: poppins;
border: none;
border-bottom: 0.7mm solid rgb(110, 110, 110);
outline: none;
box-sizing: border-box;
padding: 0 10px;
position: relative;
z-index: 1;
background: rgb(240, 243, 246);
}
.inputf:focus {
border-bottom: 0.7mm solid rgb(19, 116, 214);
background: rgb(236, 239, 243);
}
.inputf:hover {
border-bottom: 0.7mm solid rgb(77, 77, 77);
background: rgb(238, 240, 243);
}
.inputf:focus:hover {
border-bottom: 0.7mm solid rgb(19, 116, 214);
background: rgb(236, 239, 243);
}
.label {
font-family: poppins;
font-size: 12px;
font-weight: 500;
position: absolute;
top: 0;
left: 0;
z-index: 0;
transition: 0.25s;
color: rgb(19, 116, 214);
}
.inputf:focus + .label {
top: -20px;
}
.inputf:not(:placeholder-shown) + .label {
top: -20px;
}
.inputf:not(:placeholder-shown) {
border-bottom: 0.7mm solid rgb(19, 116, 214);
background: rgb(236, 239, 243);
}
</style>
</head>
<body>
<div class="input">
<input type="text" name="" id="" class="inputf" placeholder="Name" />
<span class="label">Name</span>
</div>
<!--Place the code here-->
</code></pre>
</div>
</div>
</div>
<p class="text">
<span class="hight">The third input tag design</span>, which
features a border all around and a solid box shadow towards two
sides with sharp edges, is a popular and modern design choice for
HTML forms. This design adds a sense of depth and dimension to the
input field, making it more visually engaging and interactive, the
design can convey a more approachable and friendly tone.
</p>
<div class="main-box">
<div class="main-box-control">
<button
type="button"
class="main-control-btn fr-btn"
onclick="frontit(2)"
>
Output
</button>
<button
type="button"
class="main-control-btn ba-btn"
onclick="backit(2)"
>
Code
</button>
<div class="btn-line"></div>
</div>
<div class="main-box-card">
<div class="main-box-front">
<div class="design-menu">
<div class="design-title">Style 3</div>
<div class="design-colors">
<div class="color">
<div
class="color-icons"
style="background: rgb(62, 62, 62)"
></div>
<div class="color-code">rgb(62, 62, 62)</div>
</div>
<div class="color">
<div
class="color-icons"
style="background: rgb(0, 0, 0)"
></div>
<div class="color-code">rgb(0, 0, 0)</div>
</div>
</div>
</div>
<div class="main-design">
<iframe
src="./codes/input-style3.html"
frameborder="0"
class="src"
height="100%"
></iframe>
</div>
</div>
<div class="main-box-back">
<div class="design-menu">
<div class="design-title">Style 3</div>
<div class="design-colors">
<div class="color">
<div
class="color-icons"
style="background: rgb(118, 118, 118)"
></div>
<div class="color-code">rgb(118, 118, 118)</div>
</div>
<div class="color">
<div
class="color-icons"
style="background: rgb(19, 116, 214)"
></div>
<div class="color-code">rgb(19, 116, 214)</div>
</div>
</div>
</div>
<!--Place the code here-->
<pre><code class="language-html">
<style>
.input {
width: fit-content;
height: fit-content;
position: relative;
}
.inputf {
width: 300px;
height: 35px;
font-family: poppins;
border: 0.5mm solid rgb(62, 62, 62);
outline: none;
box-sizing: border-box;
padding: 0 10px;
position: relative;
z-index: 1;
}
.inputf:focus {
box-shadow: 5px 5px 0 rgb(62, 62, 62);
}
.label {
font-family: poppins;
font-size: 12px;
font-weight: 500;
position: absolute;
top: 0;
left: 0;
z-index: 0;
transition: 0.25s;
color: black;
}
.inputf:focus + .label {
top: -20px;
}
.inputf:not(:placeholder-shown) + .label {
top: -20px;
}
.inputf:not(:placeholder-shown) {
box-shadow: 5px 5px 0 rgb(62, 62, 62);
}
</style>
<div class="input">
<input type="text" name="" id="" class="inputf" placeholder="Name" />
<span class="label">Name</span>
</div>
<!--Place the code here-->
</code></pre>
</div>
</div>
</div>
</div>
</div>
<div class="main-ads">
<div class="ad-unit2">
<script
async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7648686090734646"
crossorigin="anonymous"
></script>
<!-- square 1 -->
<ins
class="adsbygoogle"
style="display: block"
data-ad-client="ca-pub-7648686090734646"
data-ad-slot="5536471861"
data-ad-format="auto"
data-full-width-responsive="true"
></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
<div class="ad-unit2">
<script
async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7648686090734646"
crossorigin="anonymous"
></script>
<!-- square 2 -->
<ins
class="adsbygoogle"
style="display: block"
data-ad-client="ca-pub-7648686090734646"
data-ad-slot="6491279126"
data-ad-format="auto"
data-full-width-responsive="true"
></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</div>
</section>
<section class="ads">
<script
async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7648686090734646"
crossorigin="anonymous"
></script>
<!-- vertical 1 -->
<ins
class="adsbygoogle"
style="display: block"
data-ad-client="ca-pub-7648686090734646"
data-ad-slot="6128317041"
data-ad-format="auto"
data-full-width-responsive="true"
></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</section>
</div>
<script>
var cards = document.querySelectorAll(".main-box-card");
var frnt = document.querySelectorAll(".fr-btn");
var back = document.querySelectorAll(".ba-btn");
var btLine = document.querySelectorAll(".btn-line");
function backit(i) {
cards[i].style.transform = "rotateY(180deg)";
btLine[i].style.left = "calc(100% - 100px)";
}
function frontit(i) {
cards[i].style.transform = "rotateY(0)";
btLine[i].style.left = "0";
}
</script>
<script src="./highlight/highlight.min.js"></script>
<script>
hljs.highlightAll();
</script>
<script>
var checkval = document.getElementById("nbt1");
var nav = document.querySelector(".nav");
function handleFrameClick(event) {
if (checkval.checked && event.target !== checkval) {
checkval.checked = false;
nav.style.transform = "translateX(-400px)";
} else if (event.target == checkval) {
nav.style.transform = "translateX(0px)";
}
}
var iframes = document.getElementsByTagName("iframe");
for (var i = 0; i < iframes.length; i++) {
iframes[i].contentWindow.document.onclick = handleFrameClick;
}
document.onclick = handleFrameClick;
</script>
</body>
</html>