We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6736d58 commit 113d75fCopy full SHA for 113d75f
05 - Flex Panel Gallery/index-START.html renamed to 05 - Flex Panel Gallery/index.html
@@ -24,9 +24,12 @@
24
.panels {
25
min-height:100vh;
26
overflow: hidden;
27
+ display: flex;
28
+ flex-direction: horizontal;
29
}
30
31
.panel {
32
+ flex: 1;
33
background:#6B0F9C;
34
box-shadow:inset 0 0 0 5px rgba(255,255,255,0.1);
35
color:white;
@@ -68,6 +71,8 @@
68
71
69
72
.panel.open {
70
73
font-size:40px;
74
+ flex: 3;
75
+ transition: 0.2s ease-in flex;
76
77
78
.cta {
@@ -107,7 +112,13 @@
107
112
</div>
108
113
109
114
<script>
110
-
115
+ var panels = Array.from(document.querySelectorAll('.panel'));
116
+ panels.forEach(function(panel){
117
+ panel.addEventListener('click', togglePanel);
118
+ })
119
+ function togglePanel(event) {
120
+ this.classList.toggle('open');
121
+ }
111
122
</script>
123
124
0 commit comments