<style>/*
- Typography
- /
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700); /*
- Color Variables
- /
/*
- Animation Variables
- /
/*
- Global
- /
- ,
- before,
- after {
box-sizing: border-box;
}
/*
- Base
- /
body {
font-family: 'Open Sans', sans-serif; background: #eee;
} body:before {
content: ; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 100%);
}
/*
- Accordion
- /
/* Basic Accordion Styles */ .accordion {
position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 75%; box-shadow: 0 1px 8px rgba(0, 0, 0, 0.25); /* Radio Inputs */ /* Labels */ /* Panel Content */
} .accordion input[name='panel'] {
display: none;
} .accordion label {
position: relative; display: block; padding: 1em; background: linear-gradient(to bottom, #fefefe 0%, #d1d1d1 50%, #dbdbdb 55%, #e2e2e2 100%); border-top: 1px solid #fff; border-bottom: 1px solid rgba(0, 0, 0, 0.15); box-shadow: inset 0 2px 0 #fff; font-size: 1.5em; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75); color: #666; cursor: pointer; transition: all 0.4s cubic-bezier(0.865, 0.14, 0.095, 0.87);
} .accordion label:after {
content: '+'; position: absolute; right: 1em; width: 1em; height: 1em; color: #eee; text-align: center; border-radius: 50%; background: #27ae60; box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.5), 0 1px 0 #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.75);
} .accordion label:hover {
color: #27ae60;
} .accordion input:checked + label {
color: #27ae60;
} .accordion input:checked + label:after {
content: '-'; /* adjsut line-height to vertically center icon */ line-height: .8em;
} .accordion .accordion__content {
overflow: hidden; height: 0px; position: relative; padding: 0 1.5em; box-shadow: inset 4px 0 0 0 #27ae60, inset 0 3px 6px rgba(0, 0, 0, 0.75); background: #444; background: linear-gradient(to bottom, #444444 0%, #222222 100%); color: #eee; transition: height 0.4s cubic-bezier(0.865, 0.14, 0.095, 0.87);
} .accordion .accordion__content:not(:last-of-type) {
box-shadow: inset 0 -2px 2px rgba(0, 0, 0, 0.25), inset 4px 0 0 0 #27ae60, inset 0 3px 6px rgba(0, 0, 0, 0.75);
} .accordion .accordion__content .accordion__header {
padding: 1em 0;
} .accordion .accordion__content .accordion__body {
font-size: .825em; line-height: 1.4em;
}
/*
- Size Variations
- /
input[name='panel']:checked ~ .accordion__content.accordion__content--small {
height: 150px;
}
input[name='panel']:checked ~ .accordion__content.accordion__content--med {
height: 200px;
}
input[name='panel']:checked ~ .accordion__content.accordion__content--large {
height: 300px;
} </style>
<input type="radio" name="panel" id="panel-1"> <label for="panel-1">Panel 1</label>
Header
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Iusto possimus at a cum saepe molestias modi illo facere ducimus voluptatibus praesentium deleniti fugiat ab error quia sit perspiciatis velit necessitatibus.Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet.
<input type="radio" name="panel" id="panel-2"> <label for="panel-2">Panel 2</label>
Header
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Iusto possimus at a cum saepe molestias modi illo facere ducimus voluptatibus praesentium deleniti fugiat ab error quia sit perspiciatis velit necessitatibus.Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sapiente eligendi nulla illo culpa ab in at adipisci eveniet id itaque maxime soluta recusandae doloribus laboriosam dignissimos est aut cupiditate delectus.
<input type="radio" name="panel" id="panel-3"> <label for="panel-3">Panel 3</label>
Header
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Iusto possimus at a cum saepe molestias modi illo facere ducimus voluptatibus praesentium deleniti fugiat ab error quia sit perspiciatis velit necessitatibus.Lorem ipsum dolor sit amet, consectetur adipisicing elit.
<input type="radio" name="panel" id="panel-4"> <label for="panel-4">Panel 4</label>
Header
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Iusto possimus at a cum saepe molestias modi illo facere ducimus voluptatibus praesentium deleniti fugiat ab error quia sit perspiciatis velit necessitatibus.Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Assumenda odio provident ullam culpa rem tempora voluptatem inventore facere adipisci doloribus dolorum ad maxime itaque quasi animi aliquid voluptates rerum expedita? Lorem ipsum dolor sit amet, consectetur adipisicing elit. Qui culpa amet neque nostrum cumque eaque corrupti ad accusantium? Consectetur reiciendis ad earum aspernatur at quibusdam cupiditate rerum ipsam consequatur suscipit. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ab rem explicabo exercitationem unde harum? Iste nobis quae animi illum laborum incidunt hic illo ad repellat repudiandae et alias facere magni.