.sanji { width:300px; height:200px; border:1px solid red; display:none } .sanji p { width:300px; line-height:40px; border-bottom:2px solid red; margin:0 } .sanji p span { display:inline-block; width:33.3%; text-align:center; line-height:40px } .sanji p .avtive { background:red; color:white; } .sanji > div { width:100%; height:150px; display:none } .sheng { padding:0; list-style:none; width:100% } .sheng li { padding:8px 16px; border:1px solid red; text-align:center; float:left; margin-left:10px; margin-bottom:10px } .sheng .active { background:red; color:white; }
var data = [{ name: "湖北省", sub: [{ name: "武汉市", shi: [{ name: "大冶市" }, { name: "黄石市" }, { name: "阳新市" }] }] }, { name: "湖南省", sub: [{ name: "长沙市", shi: [{ name: "灵乡悬" }] }] }, { name: "广东省", sub: [{ name: "深圳市", shi: [{ name: "福田区" }, { name: "龙岗区" }, { name: "龙华区" }, { name: "龙华区" }, { name: "龙华区" }] }] }];
数据是这样的