Membuat menu dropdown tanpa menggunakan image dan javascript dapat membuat web anda jadi lebih ringan, karena tidak perlu load javascript untuk animasi menu dropdown nya.
DEMO
Dari contoh diatas menu dropdown tanpa menggunakan javascript.Untuk lebih jelasnya saya berikan untuk css nya sbb:
Lalu untuk bagian menunya selengkapnya sbb:
Penggunaan code pada menu nya silahkan kalian sesuaikan dengan kebutuhan.
Baiklah,cukup sekian dulu arikel singkat ini, semoga bermanfaat
DEMO | DOWNLOAD
DEMO
Dari contoh diatas menu dropdown tanpa menggunakan javascript.Untuk lebih jelasnya saya berikan untuk css nya sbb:
- <style type="text/css">
- .mnu {height:50px; position:relative; margin-bottom:200px;}
- .mnu ul {padding:0; margin:0; list-style:none; width:150px; float:leftleft;}
- .mnu ul ul {position:absolute; z-index:-1;
- -webkit-transition: 0.5s;
- -moz-transition: 0.5s;
- -ms-transition: 0.5s;
- -o-transition: 0.5s;
- transition: 0.5s;
- transition-delay: 0.5s;
- -o-transition-delay: 0.5s;
- -moz-transition-delay: 0.5s;
- -ms-transition-delay: 0.5s;
- -webkit-transition-delay: 0.5s;
- }
- .mnu ul ul ul {position:absolute; leftleft:150px; top:0;}
- .mnu ul ul ul.rgt {position:absolute; leftleft:auto; rightright:150px; top:0;}
- .mnu ul li {float:leftleft; width:150px; position:relative; z-index:10; background:url(trans.gif);
- -webkit-transition: 0.25s;
- -moz-transition: 0.25s;
- -ms-transition: 0.25s;
- -o-transition: 0.25s;
- }
- .mnu ul ul li {
- transition-delay: 1s;
- -o-transition-delay: 1s;
- -moz-transition-delay: 1s;
- -ms-transition-delay: 1s;
- -webkit-transition-delay: 1s;
- }
- .mnu ul ul ul li {
- transition-delay: 0.5s;
- -o-transition-delay: 0.5s;
- -moz-transition-delay: 0.5s;
- -ms-transition-delay: 0.5s;
- -webkit-transition-delay: 0.5s;
- }
- .mnu ul li a {display:block; width:139px; height:29px; padding-left:10px; background:#ddd; font:normal 12px/29px arial, sans-serif; color:#000; text-decoration:none; margin-bottom:1px; margin-right:1px;
- -o-border-radius: 10px;
- -moz-border-radius: 10px;
- -ms-border-radius: 10px;
- -webkit-border-radius: 10px;
- border-radius: 10px;
- }
- .mnu ul li a.fly {background:#ddd url(images/arrow.gif) no-repeat rightright center;}
- .mnu ul li:hover > a {background-color:#999; color:#fff;}
- .mnu ul li:hover > a.fly {background:#999 url(images/arrow-over.gif) no-repeat rightright center;}
- .mnu ul ul li {margin-top:-30px;}
- .mnu ul ul li.p1 {margin-top:0;}
- .mnu ul ul ul {margin-left:-150px;}
- .mnu ul ul ul.rgt {margin-left:0; margin-right:-150px;}
- .mnu ul li:hover > ul > li {margin-top:0;
- transition-delay: 0.5s;
- -o-transition-delay: 0.5s;
- -moz-transition-delay: 0.5s;
- -ms-transition-delay: 0.5s;
- -webkit-transition-delay: 0.5s;
- }
- .mnu ul ul li:hover > ul {margin-left:0;
- transition-delay: 0s;
- -o-transition-delay: 0s;
- -moz-transition-delay: 0s;
- -ms-transition-delay: 0s;
- -webkit-transition-delay: 0s;
- }
- .mnu ul ul li:hover > ul.rgt {margin-left:auto; margin-right:0;
- transition-delay: 0s;
- -o-transition-delay: 0s;
- -moz-transition-delay: 0s;
- -ms-transition-delay: 0s;
- -webkit-transition-delay: 0s;
- }
- .mnu ul li.close {margin-top:-30px; z-index:-1;}
- </style>
- <style media="only screen and (max-device-width:768px)" type="text/css">
- /* for iPhone, iPod Touch and iPad */
- .mnu ul li:hover + li.close {margin-top:-60px; z-index:0;}
- </style>
- <div class="mnu">
- <ul>
- <li><a href="index.html">Home</a></li>
- </ul>
- <ul>
- <li><a class="fly" href="#url">Contact Us</a>
- <ul>
- <li><a href="index.html">Email</a></li>
- <li><a href="index.html">Telephone</a></li>
- <li><a href="index.html">Online Form</a></li>
- <li><a href="index.html">Snail Mail Address</a></li>
- </ul>
- </li>
- <li class="close"><a href="#url">Close X</a></li>
- </ul>
- <ul>
- <li><a class="fly" href="#url">Resort</a>
- <ul>
- <li><a href="index.html">Ski Hire Facilities</a></li>
- <li><a class="fly" href="#url">Main Ski Slopes</a>
- <ul>
- <li class="p1"><a href="index.html">Beginners Slopes</a></li>
- <li><a href="index.html">Intermediate Slopes</a></li>
- <li><a class="fly" href="#url">Advanced Skills</a>
- <ul>
- <li class="p1"><a href="index.html">Local</a></li>
- <li><a href="index.html">Nearby</a></li>
- <li><a href="index.html">With instructor</a></li>
- <li><a href="index.html">Snow boarding</a></li>
- </ul>
- </li>
- <li><a href="index.html">Expert</a></li>
- </ul>
- </li>
- <li><a href="index.html">Night Life</a></li>
- <li><a class="fly" href="#url">Restaurants</a>
- <ul>
- <li class="p1"><a href="index.html">Snow Hotel</a></li>
- <li><a href="index.html">The Snowman</a></li>
- <li><a href="index.html">Ice Cavern</a></li>
- <li><a href="index.html">Ski Inn</a></li>
- </ul>
- </li>
- <li><a class="fly" href="#url">Car Hire</a>
- <ul>
- <li class="p1"><a href="index.html">From Airport</a></li>
- <li><a href="index.html">In Resort</a></li>
- <li><a href="index.html">Multiple Resorts</a></li>
- </ul>
- </li>
- </ul>
- </li>
- <li class="close"><a href="#url">Close X</a></li>
- </ul>
- <ul>
- <li><a class="fly" href="#url">Surrounding Area</a>
- <ul>
- <li><a href="index.html">Where to go</a></li>
- <li><a href="index.html">What to do</a></li>
- <li><a href="index.html">Places of interest</a></li>
- <li><a href="index.html">Parks & Museums</a></li>
- </ul>
- </li>
- <li class="close"><a href="#url">Close X</a></li>
- </ul>
- <ul>
- <li><a class="fly" href="#url">Information</a>
- <ul>
- <li><a href="index.html">Money Exchange</a></li>
- <li><a class="fly" href="#url">Resort Information</a>
- <ul class="rgt">
- <li class="p1"><a href="index.html">Lift Passes</a></li>
- <li><a href="index.html">Insurance</a></li>
- <li><a class="fly" href="#url">Gear Rental</a>
- <ul class="rgt">
- <li class="p1"><a href="index.html">Boots</a></li>
- <li><a href="index.html">Skis</a></li>
- <li><a href="index.html">Ski Wear</a></li>
- <li><a href="index.html">Goggles</a><b></b></li>
- </ul>
- </li>
- <li><a href="index.html">Ski Schools</a></li>
- <li><a href="index.html">Snow Report</a></li>
- </ul>
- </li>
- <li><a class="fly" href="#url">Language</a>
- <ul class="rgt">
- <li class="p1"><a href="index.html">Austrian</a></li>
- <li><a href="index.html">German</a></li>
- <li><a href="index.html">French</a></li>
- <li><a href="index.html">English</a><b></b></li>
- </ul>
- </li>
- <li><a href="index.html">Short Breaks</a></li>
- </ul>
- </li>
- <li class="close"><a href="#url">Close X</a></li>
- </ul>
- </div>
Baiklah,cukup sekian dulu arikel singkat ini, semoga bermanfaat
DEMO | DOWNLOAD
ijin nyimak,,hadoh,, baru ada niat belajar soal nyah,, lagi sibuk ngumpulin,, reperensi,,,,
BalasHapussip,makasih udah mampir
Hapus