比如我栏目有
分类一
------栏目一
------------内容标题
分类二
------栏目二
------------内容标题
分类三
------栏目三
------------内容标题
分类四
------栏目四
------------内容标题
也就是大分类下面有栏目,栏目下面有内容,我希望循环输出分类栏目下面的内容,不显示栏目,只显示分类
分类一
------------内容标题
------------内容标题
分类二
------------内容标题
------------内容标题
分类三
------------内容标题
------------内容标题
分类四
------------内容标题
------------内容标题
width:1200px;
overflow:hidden;
margin:15px auto 0 auto;
text-align:center;
}
.MainCont1{
display:table;
width:1200px;
margin:15px auto 0 auto;
}
.MainCont1 .Left,.MainCont1 .Right{
display:table-cell;
vertical-align:top;
}
.MainCont1 .Left{
width:860px;
padding-right:20px;
}
.MainCont1 .Right{
width:320px;
background:#EDEDED;
}
.HeadStyle1{
height:50px;
overflow:hidden;
border-top:#1CB29D solid 2px;
border-bottom:#ddd solid 1px;
position:relative;
}
.HeadStyle1 span{
float:left;
font:26px 'Microsoft Yahei','Simsun';
font-weight:bold;
line-height:50px;
}
.HeadStyle1 a{
display:block;
width:60px;
height:30px;
text-align:center;
line-height:30px;
position:absolute;
right:0;
bottom:8px;
font-size:14px;
}
.HeadStyle1 a:hover{
background:#369;
color:#FFF;
border-radius:3px;
}
.ListNewsInfo{
width:860px;
overflow:hidden;
}
.ListNewsInfo ul{
width:950px;
padding:10px 0 0 0;
}
.ListNewsInfo ul:after{
content:'';
display:block;
width:950px;
height:1px;
clear:both;
}
.ListNewsInfo ul li{
height:35px;
line-height:35px;
width:315px;
padding:0 70px 0 5px;
margin:0 80px 0 0;
overflow:hidden;
float:left;
font-size:14px;
position:relative;
}
.ListNewsInfo ul li:hover{
background:#369;
border-radius:5px;
}
.ListNewsInfo ul li a:nth-child(1){
color:#666;
padding-right:3px;
}
.ListNewsInfo ul li:hover a{
color:#FFF;
}
.ListNewsInfo ul li:hover a:nth-child(1){
color:#F90;
}
.ListNewsInfo ul li span{
display:block;
width:60px;
text-align:right;
position:absolute;
right:5px;
top:0;
color:#999;
}
.AcitonBut{
padding:5px;
}
.AcitonBut:after{
content:'';
display:block;
width:300px;
height:1px;
clear:both;
}
.AcitonBut li{
width:50%;
height:50px;
overflow:hidden;
padding-top:15px;
float:left;
}
.AcitonBut li a{
display:block;
background:#4FC7CE;
width:105px;
height:50px;
line-height:50px;
margin:auto;
border-radius:5px;
padding-left:25px;
text-align:center;
font-size:16px;
color:#FFF;
}
.AcitonBut li a.post{
background:#4FC7CE url(icon1.png) 10px 16px no-repeat;
}
.AcitonBut li a.post:hover{
background:#0C676C url(icon1.png) 10px 16px no-repeat;
}
.AcitonBut li a.mg{
background:#FF9999 url(icon2.png) 18px 16px no-repeat;
}
.AcitonBut li a.mg:hover{
background:#8D0F0F url(icon2.png) 18px 16px no-repeat;
}
.AcitonBut li a.edit{
background:#A8BE3F url(icon3.png) 10px 16px no-repeat;
}
.AcitonBut li a.edit:hover{
background:#637412 url(icon3.png) 10px 16px no-repeat;
}
.AcitonBut li a.rz{
background:#E39549 url(icon4.png) 18px 15px no-repeat;
}
.AcitonBut li a.rz:hover{
background:#704214 url(icon4.png) 18px 15px no-repeat;
}
.MemberCont{
width:300px;
margin:15px auto 0 auto;
padding:15px 0 10px 0;
border-top:#DDD solid 1px;
}
.MemberCont dl{
display:table;
width:100%;
}
.MemberCont dl dt,.MemberCont dl dd{
display:table-cell;
padding:5px;
vertical-align:middle;
font-size:14px;
}
.MemberCont dl dt{
width:120px;
}
.MemberCont dl dt input{
width:120px;
height:30px;
border:#DDD solid 1px;
border-radius:5px;
text-indent:5px;
}
.MemberCont dl dd{
line-height:25px;
}
.MemberCont dl dd input{
background:#BDCE6C url(line.png) center 2px no-repeat;
border:none;
width:60px;
height:30px;
margin-right:10px;
border-radius:3px;
color:#FFF;
position:relative;
}
.MemberCont dl dd input:hover{
background:#6C7D18 url(line.png) center 2px no-repeat;
}
.MemberCont dl dt.headicon{
width:100px;
}
.MemberCont dl dt.headicon div{
width:100px;
height:100px;
overflow:hidden;
margin:auto;
text-align:center;
line-height:100px;
border-radius:50px;
background:#FFF;
}
.MemberCont dl dt.headicon div img{
max-width:100px;
max-height:100px;
vertical-align:middle;
}
.MemberCont dl dd ul.info li{
height:22px;
overflow:hidden;
line-height:22px;
}
.MemberCont dl dd ul.info{
margin-bottom:5px;
}
/***/
.MainCont2{
width:1200px;
overflow:hidden;
margin:15px auto 0 auto;
}
.MoreSideInfo{
width:1230px;
display:table;
}
.MoreSideInfo .slidecont{
display:table-cell;
width:380px;
padding-right:30px;
padding-top:10px;
vertical-align:top;
}
.MoreSideInfo .slidecont .head{
height:35px;
position:relative;
}
.MoreSideInfo .slidecont .head span{
display:block;
float:left;
line-height:35px;
font-size:16px;
font-weight:bold;
position:relative;
}
.MoreSideInfo .slidecont .head span:after{
content:'';
display:block;
width:100%;
height:2px;
position:absolute;
left:0;
bottom:-1px;
background:#EF8D00;
z-index:1000;
}
.MoreSideInfo .slidecont .head a{
display:block;
width:50px;
height:25px;
text-align:center;
line-height:25px;
position:absolute;
right:0;
bottom:3px;
color:#888;
}
.MoreSideInfo .slidecont .head a:hover{
background:#EF8D00;
border-radius:3px;
color:#FFF;
}
.MoreSideInfo .slidecont .list{
height:40px;
line-height:40px;
overflow:hidden;
position:relative;
border-top:#DDD solid 1px;
padding-left:32px;
font-size:14px;
}
.MoreSideInfo .slidecont .list:hover{
background:#EFEFEF;
}
.MoreSideInfo .slidecont .list span{
display:block;
width:20px;
height:20px;
text-align:center;
line-height:20px;
position:absolute;
top:9px;
left:5px;
background:#CBCAC6;
font-style:italic;
color:#FFF;
}
.MoreSideInfo .slidecont .list:nth-child(1) span,.MoreSideInfo .slidecont .list:nth-child(2) span,.MoreSideInfo .slidecont .list:nth-child(3) span{
background:#1CB29D;
}
/***/
.FenlieSorts{
width:1200px;
overflow:hidden;
margin:15px auto 0 auto;
}
.FenlieSorts dl{
display:table;
width:100%;
border-bottom:#DDD solid 1px;
}
.FenlieSorts dl:nth-child(1){
border-top:#DDD solid 1px;
}
.FenlieSorts dl:hover{
background:#EFEFEF;
}
.FenlieSorts dl dt,.FenlieSorts dl dd{
display:table-cell;
padding:10px;
vertical-align:middle;
border-left:#DDD solid 1px;
}
.FenlieSorts dl dt{
width:120px;
border-left:0px;
}
.FenlieSorts dl dt a{
display:block;
height:35px;
line-height:35px;
overflow:hidden;
text-align:right;
font-size:16px;
color:#666;
padding-right:5px;
}
.FenlieSorts dl dt a:hover{
background:#369;
color:#FFF;
border-radius:5px;
}
.FenlieSorts dl dd ul li{
width:16%;
height:35px;
overflow:hidden;
line-height:35px;
float:left;
text-indent:10px;
font-size:16px;
margin:5px 0 5px 0;
}
.FenlieSorts dl dd ul li a{
color:#0F76CE;
}
.FenlieSorts dd ul li:hover{
background:#F90;
border-radius:5px;
}
.FenlieSorts dd ul li:hover a{
color:#FFF;
}
这个好像可以简化一下 四个值改成三个值
margin:15px(上) auto(左右) 0(下)