-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsample.html
173 lines (151 loc) · 3.89 KB
/
sample.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
<!DOCTYPE html>
<html>
<head>
<style>
body {
background: #dadada;
padding: 5em;
}
.tabs {
font-size: 1rem;
width: 30vw;
border-radius: 5px;
width: 50%;
margin: 10px auto 30px auto;
color: white;
background: #3F51B5;
}
.tabs label {
text-transform: uppercase;
cursor: pointer;
font-size: 1em;
letter-spacing: .1em;
transition: all .3s;
padding: 1.5em 1.5em;
display: block;
height: 30px;
box-shadow: 0 0 0 1px rgba(155,155,155,0.3),1px 0 0 rgba(255,255,255,0.9) inset,0 2px 2px rgba(0,0,0,0.1);
}
.tabs label:after{
content: "\02C5";
/* background-color:#82858F;*/
padding:2px 8px 2px 8px;
border-radius:4px;
font-size: 1.8em;
font-weight: bold;
float: right;
transition: .3s all;
transform: rotate(0deg);
}
.tabs label:hover {
background: #2D3D99;
}
.tabs input:checked + label,.tabs input:checked + label:hover {
background: #f1f2f3;
color: #666;
text-shadow: 0 1px 1px rgba(255,255,255,0.6);
box-shadow: 0 0 0 1px rgba(155,155,155,0.3),0 2px 2px rgba(0,0,0,0.1);
height: 30px;
line-height: 21px;
font-size: 13px;
}
.tabs label:hover:after,.tabs input:checked + label:hover:after {
transform: rotate(-180deg);
}
.tabs input {
display: none;
}
.tabs section {
background: #fcfcfc;
color: #3f3c3c;;
overflow: hidden;
height: 0;
padding-left: 3vw;
transition:height 0.3s ease-in-out,box-shadow 0.6s linear;
}
.tabs section p {
color: black;
font-size: 1.5vw
padding: 20px;
}
.tabs input:checked ~ section {
transition: height 0.5s ease-in-out,box-shadow 0.1s linear;
height:140px;
box-shadow: 0 0 0 1px rgba(155,155,155,0.3);
}
h2{
font-family: 'Dancing Script', cursive;
font-size: 2em;
text-align:center;
margin-bottom:10vh;
}
/*sub tabs CSS */
.tabs .tabs{
display:none;
width:100%;
margin:0;
padding:0;
background: #f1f1f1;
color: black;
}
.tabs input:checked +label +section +.tabs{
display:block;
}
.tabs .tabs label:hover{
background-color:grey;
}
</style>
</head>
<body>
<h2>Vertical Accordion with Pure CSS</h2>
<div class="tabs">
<div>
<input id="tab1" name="tabs" type="radio">
<label for="tab1">HTMl</label>
<section class="html">
<h4>This is pure HTML CSS tabs designed for your next project</h4>
<p>HTML:used for structuring</p>
</section>
<!--Sub tab -->
<div class="tabs">
<input id="sub-tab1" name="sub-tabs1" type="checkbox">
<label for="sub-tab1">sub-tabs1</label>
<section>
<h4>This is pure HTML CSS tabs designed for your next project</h4>
<p>HTML:used for structuring</p>
</section>
<input id="sub-tab2" name="sub-tabs1" type="checkbox">
<label for="sub-tab2">sub-tabs2</label>
<section>
<h4>This is pure HTML CSS tabs designed for your next project</h4>
<p>HTML:used for structuring</p>
</section>
</div>
</div>
<div>
<input id="tab2" name="tabs" type="radio">
<label for="tab2">CSS</label>
<section class="CSS">
<h4>This is pure css tabs design using HTML and CSS only</h4>
<p>CSS:Used for page styling</p>
</section>
</div>
<div>
<input id="tab3" name="tabs" type="radio">
<label for="tab3">References</label>
<section class="js">
<h4>In this tutorial we design tabs for website without JavaScript. </h4>
<p>JS: Not used</p>
</section>
</div>
<div>
<input id="tab4" name="tabs" type="radio">
<label for="tab4">Contact us</label>
<section class="js">
<h4>In this tutorial we design tabs for website without JavaScript. </h4>
<p>JS: Not used</p>
</section>
</div>
</div>
</body>
</html>