代码: 全选
<style>.pl .tindex1{padding:5px;width:90%;border:1px solid #CCC;background:url(http://bbs.asiaidc.net/static/image/postbg/2.jpg);line-height:28px}
.pl .tindex1 h3{margin-bottom:10px;padding-left:0;border-bottom:1px #ccc dotted;text-align:center}
.cl1:after{clear:both;display:block;visibility:hidden;height:0;content:"."}
.cl1{zoom:1}
.list-h li{float:left;overflow:hidden;padding-left:22px;width:560px;height:26px;border-bottom:1px dashed #cdcdcd;background:url(http://bbs.asiaidc.net/static/image/common/ico_mulu.png) no-repeat 10px center;color:#f33;text-align:left;font-family:arial}
.list-s li{vertical-align: top; overflow:hidden;padding-left:12px;height:26px;border-bottom:1px dashed #cdcdcd;background:url(http://bbs.asiaidc.net/static/image/common/ico_mulu.png) no-repeat 1px center;color:#f33;font-family:arial}
.list-h li a:visited{color:#800080}
.list-s li a:visited{color:#800080}
</style>
<div align="center">
<div class="tindex1 cl1">
<h3 style="border-bottom: 1px dashed #CDCDCD;">全文导航 <img style="width: 12px; height: 12px;" src="http://bbs.asiaidc.net/static/image/love/main_spinner.gif" alt="Wonderful directory navigation"/></h3>
<ul class="list-h"> <!-- 这里为横排显示的样式,只有一个<div> -->
<li><a href="#a1" sub="">55555555</a></li> <!-- #a1 表示贴中要输入的锚点的id ; 55555555 表示要输入的导航标题内容 <li>标签的数量不固定可以增加标题个数-->
<li><a href="#a2" sub="*">666666655555555555555555</a></li>
<li><a href="#a3" sub="*">77777777999999999999999</a></li>
</ul></div></div></div>
<!-- 这里以下为竖排显示的样式代码,发贴时选择其中一个 【<div style="vertical-align: ... <ul class="list-s"> <li1><li2><liN><a href ... </ul></div>】数量不固定-->
<div style="vertical-align:top; display: inline-block; text-align:left; margin-right: 10px;"><p style="text-indent:1em;text-align:left"><strong>{1}</strong></p>
<ul class="list-s">
<li><a href="#a1" sub="">55555555</a></li> <!-- <li>标签的数量同样不固定 -->
<li><a href="#a1" sub="">55555555</a></li>
<li><a href="#a1" sub="">55555555</a></li>
</ul></div></div></div>
代码: 全选
<div>
<style>.pl .tindex1{padding:5px;width:90%;border:1px solid #CCC;background:url(http://bbs.asiaidc.net/static/image/postbg/2.jpg);line-height:28px}
.pl .tindex1 h3{margin-bottom:10px;padding-left:0;border-bottom:1px #ccc dotted;text-align:center}
.cl1:after{clear:both;display:block;visibility:hidden;height:0;content:"."}
.cl1{zoom:1}
.list-h li{float:left;overflow:hidden;padding-left:22px;width:560px;height:26px;border-bottom:1px dashed #cdcdcd;background:url(http://bbs.asiaidc.net/static/image/common/ico_mulu.png) no-repeat 10px center;color:#f33;text-align:left;font-family:arial}
.list-s li{vertical-align: top; overflow:hidden;padding-left:12px;height:26px;border-bottom:1px dashed #cdcdcd;background:url(http://bbs.asiaidc.net/static/image/common/ico_mulu.png) no-repeat 1px center;color:#f33;font-family:arial}
.list-h li a:visited{color:#800080}
.list-s li a:visited{color:#800080}
</style>
<div align="center">
<div class="tindex1 cl1">
<h3 style="border-bottom: 1px dashed #CDCDCD;">精彩导航 <img style="width: 12px; height: 12px;" src="http://bbs.asiaidc.net/static/image/love/main_spinner.gif" alt="Wonderful directory navigation"/></h3>
<script type="text/javascript"> //此处以下为自己学写的代码,打开后不显示内容
function daohangfunction()
var x="{1}"; /* {1}是在编辑帖子时弹出的对话框中输入的DZ代码参数,输入h或s来判断横排还是竖排. 最多支持3个这样的参数,如<li><a href="#{一}" sub="*">{二}</a></li>这段代码可新建DZ代码用 [li= 参数1的内容]参数2的内容[/li] 表示 */
if (x=="h")
{
document.write('<ul class="list-h"><br />' + '[li= id3]参数2的内容111[/li]' + '[li= id4]参数2的内容222222[/li]' +'N个这样的DZ代码' +'</ul></div></div></div>' );
}else if(x=="s") {
document.write( '{3}' + '</ul></div></div></div>' '); /* {3}表示 【<div style="vertical-align: ... <ul class="list-s"> <li1><li2><liN><a href ... </ul></div>】这段代码中的内容*/
}
break;
</script>