示例一:
<!--内容区1右边-->
<div class="M01_right">
<dl>
<dt class="Tbg"></dt>
<dd class="Mbg">
<div class="newspic">
<dl>
<dt><img src="images/tif.gif"/>图片库 | <span><a href="#">历届奥运会图片</a></span> |<span><a href="#"> 奥运场馆图片</a></span>|</dt>
| 精简为: <dd class="Mbg"> <dl class="newspic"> <dt><img src="images/tif.gif"/>图片库 | <span><a href="#">历届奥运会图片</a></span> |<span><a href="#"> 奥运场馆图片</a></span>|</dt> |
<dd>
<div class="uu">
<ul>
{PE.Label id="O_文章子栏目列表" tablename="PE_U_Article" parentid="1" shownum="1" titlelen="12" datasourceid="2" contentlen="55" opentype="_blank" hits="0" elitelevel="0" span="" class="" /}
</ul>
</div>
<div class="clear"></div>
| 精简为: <dd class="uu"> <ul> {PE.Label id="O_文章子栏目列表" tablename="PE_U_Article" parentid="1" shownum="1" titlelen="12" datasourceid="2" contentlen="55" opentype="_blank" hits="0" elitelevel="0" span="" class="" /} </ul> <div class="clear"></div> </dd> |
<div class="pic_block">
<ul>
{PE.Label id="带图片内容列表_文章_普通式" parentid="1" arrnodeid="0" includechild="false" specialid="0" shownum="3" ishot="false" iselite="true" datenum="0" ordertype="1" imgwidth="
120" imgheight="80" titlelen="12" contentlen="0" showtips="false" urltype="0" hits="0" elitelevel="0" /}
</ul>
</div>
</dd>
| 精简为: <dd class="pic_block"> <ul> {PE.Label id="带图片内容列表_文章_普通式" parentid="1" arrnodeid="0" includechild="false" specialid="0" shownum="3" ishot="false" iselite="true" datenum="0" ordertype="1" imgwidth=" 120" imgheight="80" titlelen="12" contentlen="0" showtips="false" urltype="0" hits="0" elitelevel="0" /} </ul> </dd> |
<dt><img src="images/tif.gif"/>奥林匹克文化</dt>
<dd class="music"><a href="#">歌曲征集</a> | <a href="#">文化节</a> | <a href="#">开闭幕式</a> | <a href="#">形象景观</a></dd>
<dd>
<div class="musiclist">
<ul>
{PE.Label id="文章信息列表_普通式" parentid="1" arrnodeid="0" includechild="true" specialid="0" urltype="0" shownum="5" ishot="false" iselite="false" inputername="" datenum="0" ordertype="{PE.Label id="取得栏目下的内容排序方式" nodeid="1" /}" showtype="1" titlelen="40" contentlen="0" shownodename="false" showpropertytype="0" showincludepic="false" showauthor="false" showhits="false" showhotsign="false" shownewsign="false" showtips="true" showcommentlink="false" usepage="false" opentype="{PE.Label id="取得栏目下的内容打开方式" nodeid="1" /}" cols="0" hits="0" elitelevel="0" /}
</ul>
</div>
<div class="firead"><a href="#"><img src="images/fire.gif" alt="奥运圣火" /></a></div>
</dd>
| 精简为: <dd class="musiclist"> <ul> {PE.Label id="文章信息列表_普通式" parentid="1" arrnodeid="0" includechild="true" specialid="0" urltype="0" shownum="5" ishot="false" iselite="false" inputername="" datenum="0" ordertype="{PE.Label id="取得栏目下的内容排序方式" nodeid="1" /}" showtype="1" titlelen="40" contentlen="0" shownodename="false" showpropertytype="0" showincludepic="false" showauthor="false" showhits="false" showhotsign="false" shownewsign="false" showtips="true" showcommentlink="false" usepage="false" opentype="{PE.Label id="取得栏目下的内容打开方式" nodeid="1" /}" cols="0" hits="0" elitelevel="0" /} </ul> <div class="firead"><a href="#"><img src="images/fire.gif" alt="奥运圣火" /></a></div> </dd> |
小结:
dd 区块 div 区块进行嵌套使用时,在不需要多重背景、样式等复杂需要时,可以更为简洁。与在外围有 dd 区块且未有定义时,不需要再添加 div 区块,可以直接对dd定义样式,即:
<dd>
<div class="">……</div>
</dd>
可以简化为:
<dd class="">
……
</dd>
示例二:
<div class="aoyun_title">
<dl>
<dt></dt>
<dd>
<!--奥运右边开始-->
<div class="aoyun_right">
<dl>
<dt>夺金焦点</dt>
<dd>
<div class="u">
<ul>
{PE.Label id="O_文章子栏目列表" tablename="PE_U_Article" parentid="1" shownum="1" titlelen="12" datasourceid="2" contentlen="55" opentype="_blank" hits="0" elitelevel="0" span="" class="" /}
</ul>
</div>
<div class="clear"></div>
<div class="aoyun_text1">
<ul>
{PE.Label id="文章信息列表_普通式" parentid="1" arrnodeid="0" includechild="true" specialid="0" urltype="0" shownum="5" ishot="false" iselite="false" inputername="" datenum="0" ordertype="{PE.Label id="取得栏目下的内容排序方式" nodeid="1" /}" showtype="1" titlelen="40" contentlen="0" shownodename="false" showpropertytype="0" showincludepic="false" showauthor="false" showhits="false" showhotsign="false" shownewsign="false" showtips="true" showcommentlink="false" usepage="false" opentype="{PE.Label id="取得栏目下的内容打开方式" nodeid="1" /}" cols="0" hits="0" elitelevel="0" /}
</ul>
</div >
</dd>
<dt>金牌之队</dt>
<dd>
<!--第一个-->
<div class="gold">
{PE.Label id="LEWI-左图右介绍定制版" tablename="PE_U_Article" parentid="1" shownum="2" TitleLength="16" ContentLength="50" opentype="_blank" hits="0" elitelevel="0" span="" class="" /}
</div>
</dd>
</dl>
</div>
……
| 原结构: <div class="aoyun_title"> |
| 精简为: <div class="aoyun_title"> |