Mguillaume (Talk | contribs) |
|||
Line 2: | Line 2: | ||
− | < | + | <!DOCTYPE html> |
− | <title> | + | <html> |
− | + | <head> | |
− | + | <title>mohammad</title> | |
− | + | <link rel="stylesheet" type="text/css" href="style.css"> | |
− | </head> | + | <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=open+Sans"> |
+ | </head> | ||
+ | <body> | ||
+ | <nav class="menu"> | ||
+ | |||
+ | <ul id="rmenu"> | ||
+ | <li> <a class="menu-item" href="#"> HOME</a> | ||
+ | |||
+ | </li> | ||
+ | <li> <a class="menu-item" href="#">TEAM</a> | ||
+ | <div class="sub-content"> | ||
+ | <div class="sub-drop"> | ||
+ | <ul> | ||
+ | <li><a href="#" class="sub-item">The Team</a></li> | ||
+ | <li><a href="#" class="sub-item">Team Attribution</a></li> | ||
+ | </ul> | ||
+ | </div> | ||
+ | </div> | ||
+ | </li> | ||
+ | <li> <a class="menu-item" href="#">PROJECT</a> | ||
+ | <div class="sub-content"> | ||
+ | <div class="sub-drop"> | ||
+ | <ul> | ||
− | |||
+ | <li><a href="#" class="sub-item">The Project</a></li> | ||
+ | <li><a href="#" class="sub-item">Modeling</a> | ||
+ | <ul id="subx-menu"> | ||
+ | <li><a href="#" class="subx-item">Genetic stability</a></li> | ||
+ | <li><a href="#" class="subx-item">Glyoxylate Shunt</a></li> | ||
+ | <li><a href="#" class="subx-item">Biosensor</a></li> | ||
+ | <li><a href="#" class="subx-item">Transporter</a></li> | ||
+ | </ul> | ||
− | + | </li> | |
+ | |||
+ | |||
+ | </ul> | ||
+ | </div> | ||
+ | </div> | ||
+ | |||
+ | </li> | ||
+ | <li> <a class="menu-item" href="#">NEWS</a> | ||
+ | <div class="sub-content"> | ||
+ | <div class="sub-drop"> | ||
+ | <ul> | ||
+ | <li><a href="#" class="sub-item">The news</a></li> | ||
+ | <li><a href="#" class="sub-item">Newsletters</a></li> | ||
+ | <li><a href="#" class="sub-item">Online articles</a></li> | ||
+ | <li><a href="#" class="sub-item">Magazines</a></li> | ||
+ | <li><a href="#" class="sub-item">Platforms</a></li> | ||
+ | </ul> | ||
+ | </div> | ||
+ | </div> </li> | ||
+ | <li> <a class="menu-item" href="#">OUTREACH</a> </li> | ||
+ | <li> <a class="menu-item" href="#">SPONSORS</a> </li> | ||
+ | <li> <a class="menu-item" href="#">LABORATORY</a> | ||
+ | <div class="sub-content"> | ||
+ | <div class="sub-drop"> | ||
+ | <ul> | ||
+ | <li><a href="#" class="sub-item">Parts</a></li> | ||
+ | <li><a href="#" class="sub-item">Labjournal</a></li> | ||
+ | <li><a href="#" class="sub-item">Protocols</a></li> | ||
+ | </ul> | ||
+ | </div> | ||
+ | </div> | ||
+ | </li> | ||
+ | <li> <a class="menu-item" href="#">Achievements</a> </li> | ||
+ | <li> <a class="menu-item" href="#">SAFETY</a> </li> | ||
+ | |||
+ | |||
+ | |||
+ | </ul> | ||
+ | </nav> | ||
− | + | </body> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
<!-- //////////////////////////////////////////// --> | <!-- //////////////////////////////////////////// --> | ||
<style> | <style> | ||
− | + | * { | |
+ | margin: 0; | ||
+ | padding: 0; | ||
+ | font: 1em "open Sans", sans-serf; | ||
+ | } | ||
+ | body { | ||
− | + | background-color: #eee; | |
− | + | ||
} | } | ||
− | . | + | |
− | background-color: # | + | /*.....................................*/ |
− | height: | + | |
− | + | .menu { | |
− | - | + | position: fixed; |
− | - | + | left: 0; |
+ | top: 0; | ||
+ | border-top: 0; | ||
+ | z-index: 100; | ||
+ | box-shadow: -1px 15px 1px rgba(0,0,0,0.3); | ||
+ | width: 100%; | ||
+ | background-color: #333; | ||
+ | color: #fff; | ||
+ | height: 60px; | ||
+ | } | ||
+ | .myimg { | ||
+ | width: 100px; | ||
+ | float: left; | ||
+ | height: 30px; | ||
+ | padding: 15px 30px; | ||
+ | } | ||
+ | .menu #logo { | ||
+ | float: left; | ||
+ | height: 30px; | ||
+ | padding: 15px 30px; | ||
+ | font-size: 1.2em; | ||
+ | line-height: 30px; | ||
+ | display: none; | ||
+ | } | ||
+ | .menu > ul { | ||
+ | margin: 0; | ||
+ | padding: 0; | ||
+ | float: left; | ||
+ | list-style-type: none; | ||
} | } | ||
− | . | + | .menu > ul > li { |
− | + | overflow: hidden; | |
− | + | float: left; | |
− | + | ||
} | } | ||
− | . | + | |
− | display: inline; | + | .menu-item { |
+ | display: inline-block; | ||
+ | padding: 15px 10px; | ||
+ | height: 30px; | ||
+ | line-height: 30px; | ||
+ | color: #fff; | ||
+ | text-decoration: none; | ||
} | } | ||
− | . | + | .menu-item:hover { |
− | color: | + | |
− | padding: | + | background-color: #ff0055; |
+ | } | ||
+ | |||
+ | |||
+ | /*................STYLING SUB.....................*/ | ||
+ | |||
+ | .sub-content { | ||
+ | |||
+ | position: absolute; | ||
+ | top: 100%; | ||
+ | overflow: hidden; | ||
+ | background-color: #333; | ||
+ | max-height: 0; | ||
+ | } | ||
+ | |||
+ | .sub-content a { | ||
+ | color: #fff; | ||
+ | text-decoration: none; | ||
+ | } | ||
+ | |||
+ | .sub-drop { | ||
+ | |||
+ | padding: 0; | ||
+ | } | ||
+ | |||
+ | .sub-drop ul { | ||
+ | width: 100%; | ||
+ | padding: 0; | ||
+ | margin: 0; | ||
+ | list-style-type: none; | ||
+ | } | ||
+ | |||
+ | .sub-drop ul li a { | ||
display: inline-block; | display: inline-block; | ||
− | + | padding: 10px 20px; | |
} | } | ||
− | . | + | .sub-drop ul li:hover { |
− | + | ||
− | background-color: # | + | background-color: #ff0055; |
− | + | ||
} | } | ||
− | /* | + | /*...............Sub-sub Menu.....................*/ |
− | + | ||
− | + | ul#subx-menu { | |
− | + | position: absolute; | |
− | + | top: 36px; | |
− | */ | + | left: 99px; |
− | # | + | background-color: #333; |
− | + | overflow: hidden; | |
− | + | max-width: 0; | |
− | + | ||
} | } | ||
− | + | ||
− | + | ul#subx-menu { | |
− | # | + | width: 130px; |
− | + | ||
− | + | ||
} | } | ||
− | # | + | |
− | + | .sub-drop ul li:hover > ul#subx-menu { | |
+ | max-width: 400px; | ||
+ | transition: max-width 0.5s ease-in; | ||
+ | -webkit-transition: max-height 0.3s ease-in; | ||
+ | -moz-transition: max-height 0.3s ease-in; | ||
} | } | ||
− | + | ||
− | + | ||
+ | /*...............Sub Drop.....................*/ | ||
+ | |||
+ | |||
+ | |||
+ | .sub-drop > ul { | ||
+ | overflow: hidden; | ||
+ | visibility: hidden; | ||
+ | opacity: 0; | ||
} | } | ||
− | . | + | |
− | + | .menu ul li:hover .sub-drop ul{ | |
+ | visibility: visible; | ||
+ | opacity: 1; | ||
+ | transition: visibility 0s, opacity 0.3s ease-in; | ||
} | } | ||
− | |||
− | |||
− | |||
+ | /*................Controling.....................*/ | ||
+ | |||
+ | |||
+ | .menu-item:focus { | ||
+ | |||
+ | background-color: #ff0055; | ||
+ | } | ||
+ | |||
+ | .menu ul li:hover .sub-content { | ||
+ | max-height: 400px; | ||
+ | overflow: visible; | ||
+ | transition: max-height 0.3s ease-in; | ||
+ | -webkit-transition: max-height 0.3s ease-in; | ||
+ | -moz-transition: max-height 0.3s ease-in; | ||
+ | } | ||
+ | |||
+ | #rmenu { | ||
+ | |||
+ | float:right; | ||
+ | } | ||
</style> | </style> |
Revision as of 22:19, 1 August 2017