-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaccordion.css
49 lines (40 loc) · 1.03 KB
/
accordion.css
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
/* JS for the accordion can be found at https://codepen.io/blaketm/pen/pPXyVj */
/*
* Apply .byu-accordion to the bar//tab of your accordion
* Apply .byu-accordion-panel to content of each section of teh accordion
*/
.byu-accordion {
background-color: #002E5D;
color: #FFF;
cursor: pointer;
padding: 18px;
text-align: left;
border: none;
outline: none;
transition: 0.4s;
width: 100%;
}
.byu-accordion::after {
content: '+';
font-size: 13px;
color: #FFF;
float: right;
text-align: right;
margin-left: 5px;
}
.byu-accordion.active::after {
content: '-';
}
/* Add a background color to the if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */
.byu-accordion.active,
.byu-accordion:hover {
background-color: #2B4D6E;
}
/* Style the accordion panel. Note: hidden by default */
.byu-accordion-panel {
padding: 0 18px;
background-color: #F2F2F2;
max-height: 0;
overflow: hidden;
transition: max-height 0.2s ease-out;
}