Created
March 5, 2013 04:31
-
-
Save omurphy27/5088020 to your computer and use it in GitHub Desktop.
CSS Accordian Arrow Hover Effect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* the following CSS, particularly the span stuff creates the accordian arrow effect */ | |
/* can use the same arrow image and just css3 rotate it */ | |
.st-accordion ul li > a{ | |
font-family: 'Josefin Slab',Georgia, serif; | |
text-shadow: 1px 1px 1px #fff; | |
font-size: 46px; | |
display: block; | |
position: relative; | |
line-height: 100px; | |
outline:none; | |
-webkit-transition: color 0.2s ease-in-out; | |
-moz-transition: color 0.2s ease-in-out; | |
-o-transition: color 0.2s ease-in-out; | |
-ms-transition: color 0.2s ease-in-out; | |
transition: color 0.2s ease-in-out; | |
} | |
.st-accordion ul li > a span{ | |
background: transparent url(../images/down.png) no-repeat center center; | |
text-indent:-9000px; | |
width: 26px; | |
height: 14px; | |
position: absolute; | |
top: 50%; | |
right: -26px; | |
margin-top: -7px; | |
opacity:0; | |
-webkit-transition: all 0.2s ease-in-out; | |
-moz-transition: all 0.2s ease-in-out; | |
-o-transition: all 0.2s ease-in-out; | |
-ms-transition: all 0.2s ease-in-out; | |
transition: all 0.2s ease-in-out; | |
} | |
.st-accordion ul li > a:hover{ | |
color: #1693eb; | |
} | |
.st-accordion ul li > a:hover span{ | |
opacity:1; | |
right: 10px; | |
} | |
.st-accordion ul li.st-open > a{ | |
color: #1693eb; | |
} | |
.st-accordion ul li.st-open > a span{ | |
-webkit-transform:rotate(180deg); | |
-moz-transform:rotate(180deg); | |
transform:rotate(180deg); | |
right:10px; | |
opacity:1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment