Created
March 18, 2012 18:22
-
-
Save cedricici/2079259 to your computer and use it in GitHub Desktop.
hover+target menu
This file contains hidden or 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
/** | |
* hover+target menu | |
*/ | |
*{ | |
margin:0;padding:0; | |
list-style-type:none; | |
text-decoration:none; | |
} | |
body>ul{ | |
margin:30px; | |
} | |
body ul { | |
width:124px; | |
box-shadow:2px 2px 10px 2px rgba(0,0,0,.8); | |
border-radius:5px 5px 5px 5px ; | |
} | |
body>ul li:first-child>a{ | |
border-radius:5px 5px 0 0; | |
} | |
body>ul li:last-child>a{ | |
border-radius:0 0 5px 5px; | |
} | |
a { | |
display:block; | |
width:120px; | |
background: #888; | |
color:#fff; | |
padding:2px; | |
} | |
a:hover{ | |
background:#222; | |
} | |
body>ul>li:first-child a{ | |
border-bottom :0px solid #000; | |
box-shadow:0px -4px 5px -5px #000 inset; | |
} | |
body ul a+ul{ | |
position:absolute; | |
left:110px; | |
margin-top:-1.2em; | |
opacity:0; | |
transition:all ease 0.5s; | |
} | |
body ul a:target+ul{ | |
opacity:1; | |
z-index:100; | |
} |
This file contains hidden or 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
<ul> | |
<li><a id="sm" href="#sm">Menu</a></li> | |
<li><a id="sm1" href="#sm1" >SousMenu 1</a> | |
<ul> | |
<li><a href="" >1</a></li> | |
<li><a href="" >2</a></li> | |
<li><a href="" >3</a></li> | |
<li><a href="" >4</a></li> | |
</ul> | |
</li> | |
<li><a id="sm2" href="#sm2" >SousMenu 2</a> | |
<ul> | |
<li><a href="" >5</a></li> | |
<li><a href="" >6</a></li> | |
<li><a href="" >7</a></li> | |
</ul> | |
</li> | |
<li><a id="sm3" href="#sm3" >SousMenu 3</a> | |
<ul> | |
<li><a href="" >8</a></li> | |
<li><a href="" >9</a></li> | |
<li><a href="" >10</a></li> | |
<li><a href="" >11</a></li> | |
<li><a href="" >12</a></li> | |
</ul> | |
</li> | |
<li><a id="sm4" href="#sm4" >SousMenu 4</a> | |
<ul> | |
<li><a href="" >13</a></li> | |
<li><a href="" >14</a></li> | |
</ul> | |
</li> | |
</ul> |
This file contains hidden or 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
{"view":"split","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment