首页 > 代码库 > jsfiddle在线测试Html、CSS、JavaScript——http://jsfiddle.net/
jsfiddle在线测试Html、CSS、JavaScript——http://jsfiddle.net/
jsfiddle在线测试Html、CSS、JavaScript,并展示测试结果
1、选择jQuery1.9.1
2、选择jQuery UI 1.9.2
3、Html
<ul id="nav">
<li><a href=http://www.mamicode.com/"#">Item 1
<li><a href=http://www.mamicode.com/"#">Item 2
<li><a href=http://www.mamicode.com/"#">Item 3
<ul>
<li><a href=http://www.mamicode.com/"#">Item 3-1
<ul>
<li><a href=http://www.mamicode.com/"#">Item 3-11
<li><a href=http://www.mamicode.com/"#">Item 3-12
<li><a href=http://www.mamicode.com/"#">Item 3-13
</ul>
</li>
<li><a href=http://www.mamicode.com/"#">Item 3-2
<li><a href=http://www.mamicode.com/"#">Item 3-3
<li><a href=http://www.mamicode.com/"#">Item 3-4
<li><a href=http://www.mamicode.com/"#">Item 3-5
</ul>
</li>
<li><a href=http://www.mamicode.com/"#">Item 4
<li><a href=http://www.mamicode.com/"#">Item 5
</ul>
4、CSS
.ui-menu { list-style:none; padding: 2px; margin: 0; display:block; outline: none; }
.ui-menu .ui-menu { margin-top: -3px; position: absolute; }
.ui-menu .ui-menu-item {
display: inline-block;
float: left;
margin: 0;
padding: 0;
width: auto;
}
.ui-menu .ui-menu-divider { margin: 5px -2px 5px -2px; height: 0; font-size: 0; line-height: 0; border-width: 1px 0 0 0; }
.ui-menu .ui-menu-item a { text-decoration: none; display: block; padding: 2px .4em; line-height: 1.5; zoom: 1; font-weight: normal; }
.ui-menu .ui-menu-item a.ui-state-focus,
.ui-menu .ui-menu-item a.ui-state-active { font-weight: normal; margin: -1px; }
.ui-menu .ui-state-disabled { font-weight: normal; margin: .4em 0 .2em; line-height: 1.5; }
.ui-menu .ui-state-disabled a { cursor: default; }
.ui-menu:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
5、JavaScript
$( "#nav" ).menu({position: {at: "left bottom"}});
6、点击左上角的“Run”
jsfiddle在线测试Html、CSS、JavaScript——http://jsfiddle.net/