-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.html
More file actions
184 lines (174 loc) · 5.77 KB
/
main.html
File metadata and controls
184 lines (174 loc) · 5.77 KB
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
<!DOCTYPE html>
<html>
<head>
<title>VC Toggle Switch</title>
<meta charset="UTF-8" />
<link rel="stylesheet" type="text/css" href="vc-toggle-switch.css" />
</head>
<body>
<nav class="mb-3 navbar navbar-dark bg-dark">
<span class="navbar-brand mb-0 h1">
VC Toggle Switch
</span>
<span class="text-light">
A pure CSS toggle by
<a
target="_blank"
class="text-light"
href="https://www.linkedin.com/in/vinícius-chab/"
>Vinícius Chab</a
>
</span>
<span>
<a
target="_blank"
class="text-light"
href="https://github.com/ViniChab/CSS-toggle-switch"
>Github</a
>
</span>
</nav>
<div class="text-center">
<div class="text-center d-inline-block">
<span class="m-3 p-2 badge badge-dark">Default Toggle With Text</span>
<div class="vc-toggle-container">
<label class="vc-switch">
<input type="checkbox" class="vc-switch-input" />
<span class="vc-switch-label" data-on="Yes" data-off="No"></span>
<span class="vc-handle"></span>
</label>
</div>
</div>
<div style="--vc-width: 40px;" class="text-center d-inline-block">
<span class="m-3 p-2 badge badge-dark">Default Toggle Without Text</span>
<div class="vc-toggle-container">
<label class="vc-switch">
<input type="checkbox" class="vc-switch-input" />
<span class="vc-switch-label"></span>
<span class="vc-handle"></span>
</label>
</div>
</div>
<div
style="--vc-off-color: red"
class="text-center d-inline-block"
>
<span class="m-3 p-2 badge badge-dark">Red Toggle With Text</span>
<div class="vc-toggle-container">
<label class="vc-switch">
<input type="checkbox" class="vc-switch-input" />
<span data-on="Yes" data-off="No" class="vc-switch-label"></span>
<span class="vc-handle"></span>
</label>
</div>
</div>
<div
style="
--vc-off-color: blue;
--vc-on-color: blue;
--vc-on-font-color: red;
--vc-off-font-color: red;
"
class="text-center d-inline-block"
>
<span class="m-3 p-2 badge badge-dark">Blue Toggle With Red Text</span>
<div class="vc-toggle-container">
<label class="vc-switch">
<input type="checkbox" class="vc-switch-input" />
<span
data-on="Yes"
data-off="No"
class="vc-switch-label"
></span>
<span class="vc-handle"></span>
</label>
</div>
</div>
<div
style="
--vc-animation-speed: 0;
--vc-box-border-radius: 0;
--vc-handle-border-radius: 0;
--vc-onclick-width: 15px;
--vc-width: 40px;
"
class="text-center d-inline-block"
>
<span class="m-3 p-2 badge badge-dark">Square Toggle Without Animation</span>
<div class="vc-toggle-container">
<label class="vc-switch">
<input type="checkbox" class="vc-switch-input" />
<span class="vc-switch-label" ></span>
<span class="vc-handle"></span>
</label>
</div>
</div>
<div
style="
--vc-off-color: linear-gradient(to right, blue , green, red);
--vc-on-color: linear-gradient( purple , pink, black);
--vc-on-font-color: rgb(255, 166, 0);
--vc-off-font-color: rgb(0, 60, 255);
--vc-handle-color: orange;
"
class="text-center d-inline-block"
>
<span class="m-3 p-2 badge badge-dark">If Your Designer Goes Insane</span>
<div class="vc-toggle-container">
<label class="vc-switch">
<input type="checkbox" class="vc-switch-input" />
<span data-on="Yes" data-off="No" class="vc-switch-label"></span>
<span class="vc-handle"
></span>
</label>
</div>
</div>
<div
style="
--vc-width: 60px;
--vc-height: 30px;
--vc-handle-width: 20px;
--vc-handle-height: 20px;
--vc-onclick-width: 50px;
--vc-font-size: 13px;
--vc-font-weight: 900;
"
class="text-center d-inline-block"
>
<span class="m-3 p-2 badge badge-dark">Very Smooth Big Toggle</span>
<div class="vc-toggle-container">
<label class="vc-switch">
<input type="checkbox" class="vc-switch-input" />
<span data-on="Yes" data-off="No" class="vc-switch-label"></span>
<span class="vc-handle"
></span>
</label>
</div>
</div>
</div>
</body>
</body>
<!-- Adding Bootstrap-->
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
crossorigin="anonymous"
/>
<script
src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"
></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"
></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"
></script>
<!-- Adding Bootstrap-->
</html>