|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<style type="text/css">
* {
margin: 0;
padding: 0;
}
body {
font-family: Helvetica, Arial, sans-serif;
text-align: center;
}
ol, ul {
list-style: none;
}
#container {
width: 950px;
margin-left: auto;
margin-right: auto;
}
h1 {
color: #06C;
font-size: 16px;
font-weight: bold;
margin-bottom: 20px;
border-bottom: dotted 1px #003;
margin-top: 20px;
text-align: left;
}
ul li {
display: block;
float: left;
margin-right: 20px;
width: 200px;
background-color:#06C;
line-height: 20px;
}
ul li a {
text-decoration: none;
color: #333;
font-size: 11px;
color: #fff;
font-weight: bold;
}
ul li ul {
display: none;
background-color: #6CF;
line-height: 14px;
}
ul li ul li a {
font-size: 10px;
font-weight: normal;
display: block;
width: 100%;
background-color: #09F;
}
ul li ul li a:hover {
background: #06C;
}
ul li:hover ul {
display: block;
}
</style>
<script type="text/javascript">
$(document).ready(function(){
$('ul li ul').hover(
function() { $(this).css('display', 'block'); },
function() { $(this).css('display', 'none'); });
});
</script>
</head>
<body>
<div id="container">
<h1>Mon menu déroulant en CSS</h1>
<ul>
<li><a href="#">Entreprise</a>
<ul><li><a href="#">Histoire</a></li>
<li><a href="#">Philosophie</a></li>
<li><a href="#">Notre équipe</a></li>
<li><a href="#">Nos atouts</a></li></ul>
<li><a href="#">Produits</a>
<ul><li><a href="#">Produits phare</a></li>
<li><a href="#">Nouveaux produits</a></li>
<li><a href="#">Produits du futur</a></li></ul></li>
<li><a href="#">Partenaires</a></li>
<li><a href="#">Contact</a><ul><li><a href="#">Siège
social</a></li>
<li><a href="#">Formulaire</a></li></ul></li>
</ul>
</div>
</body>
</html>
|