窗体1
$(function () {
var name = "";
$("#menu ul li a").each(function () {
$(this).click(function () {
name = $(this).attr("title");
$("#div2 div").each(function () {
$(this).attr("style", "background-color:" + name + ";display:none;");
if ($(this).attr("id") == name) {
$(this).attr("style", "background-color:" + name + ";");
}
})
});
});
});
.div1{width:1006px;height:682px;float:left;}
#menu ul li { display:inline; float:left; margin-bottom:20px; }
#menu ul li a { padding:20px;text-decoration: none;}
.main { clear:both;width:10%; height:60px;margin-left:0px;}
查看更多关于html中div的位置问题_html/css_WEB-ITnose的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did103208