<div class="cp_ipselect">
<input type="radio" name="option">
<i class="toggle cp_sl07_arrowdown"></i>
<i class="toggle cp_sl07_arrowup"></i>
<span class="cp_sl07_selectlabel">Choose</span>
<label class="option">
<input type="radio" name="option">
<span class="cp_sl07_title">cat</span>
</label>
<label class="option">
<input type="radio" name="option">
<span class="cp_sl07_title">dog</span>
</label>
<label class="option">
<input type="radio" name="option">
<span class="cp_sl07_title">rabbit</span>
</label>
<label class="option">
<input type="radio" name="option">
<span class="cp_sl07_title">squirrel</span>
</label>
</div>
.cp_ipselect {
position: relative;
display: block;
overflow: hidden;
width: 90%;
height: 100%;
margin: 2em auto;
border-radius: 3px;
color: #ffffff;
}
.cp_ipselect > i.toggle {
position: absolute;
z-index: 4;
top: 1.6em;
right: 1.5em;
color: #ffffff;
}
.cp_ipselect .cp_sl07_arrowup:before {
position: absolute;
top: 0;
right: 0;
width: 0;
height: 0;
padding: 0;
content: '';
pointer-events: none;
border-right: 6px solid transparent;
border-bottom: 6px solid #ffffff;
border-left: 6px solid transparent;
-webkit-transition: all 250ms cubic-bezier(.4,.25,.3,1);
transition: all 250ms cubic-bezier(.4,.25,.3,1);
}
.cp_ipselect .cp_sl07_arrowdown:before {
position: absolute;
top: 0;
right: 0;
width: 0;
height: 0;
padding: 0;
content: '';
pointer-events: none;
border-top: 6px solid #ffffff;
border-right: 6px solid transparent;
border-left: 6px solid transparent;
-webkit-transition: all 250ms cubic-bezier(.4,.25,.3,1);
transition: all 250ms cubic-bezier(.4,.25,.3,1);
}
.cp_ipselect .cp_sl07_title, .cp_ipselect .cp_sl07_selectlabel {
position: relative;
display: block;
width: 100%;
height: 100%;
padding: 1em 1em;
cursor: pointer;
border-top: 1px solid rgba(0, 0, 0, 0.05);
background: #da3c41;
}
.cp_ipselect > input {
position: absolute;
z-index: 1;
top: 0;
left: 0;
display: block;
width: 100%;
height: 100%;
cursor: pointer;
opacity: 0;
}
.cp_ipselect > input:checked ~ i.toggle.cp_sl07_arrowdown {
display: none;
}
.cp_ipselect > input:checked ~ i.toggle.cp_sl07_arrowup {
display: block;
}
.cp_ipselect > input:checked div.options label.option .cp_sl07_title {
display: none !important;
}
.cp_ipselect > input:not(:checked) {
z-index: 4;
}
.cp_ipselect > input:not(:checked) ~ label.option > span.cp_sl07_title {
display: none;
}
.cp_ipselect > input:not(:checked) ~ i.toggle.cp_sl07_arrowup {
display: none;
}
.cp_ipselect > input:not(:checked) ~ i.toggle.cp_sl07_arrowdown {
display: block;
}
.cp_ipselect > span.cp_sl07_selectlabel {
position: relative;
z-index: 0;
display: inline-block;
width: 100%;
color: #ffffff;
border-top: 0;
}
.cp_ipselect label.option {
z-index: 1;
display: block;
overflow: hidden;
width: 100%;
transition: all 1s ease-out;
}
.cp_ipselect label.option span.cp_sl07_title {
position: relative;
z-index: 2;
transition: 0.3s ease-out;
}
.cp_ipselect label.option span.cp_sl07_title:hover {
color: #ffffff;
background: #1b2538;
}
.cp_ipselect label.option input {
display: none;
}
.cp_ipselect label.option input:checked ~ span.cp_sl07_title {
position: absolute;
z-index: 3;
top: 0;
display: block;
width: 100%;
color: inherit;
border-top: 0;
background: #1b2538;
box-shadow: none;
}