问答详情
源自:2-1 实现菜单基本结构和样式

问什么我的二级菜单不在同一行<dt></dt><dd></dd>不在同一行

#sub{

width:700px;

position:absolute;

border:1px solid #f7f7f7;

background:#f7f7f7;

box-shadow:2px 0 5px rgba(0,0,0,.3);

left:105px;

top:0;

box-sizing:border-box;

margin:0;

padding:10px;

}

.sub_content a{

font-size:12px;

color:#666;

text-decoration:none;

}

.sub_content dd a{

border-left:1px solid #e0e0e0;

padding:0 10px;

margin:4px 0;

}

.sub_content dl {

height:auto;

overflow:hidden;

}

.sub_content dt{

float: left;

width:70px;

font-weight:bold;

clear:left;

position:relative;

}

.sub_content dd{

float:left;

margin-left:30px;

border-top:1px solid #eee;

margin-bottom:5px;

}

.sub_content dd i{

width:10px;

height:14px;

font:400 9p/14px consolas;

position:absolute;

right:5px;

top:5px;

}


提问者:_0莫言0_ 2018-12-01 09:34

个回答

  • weixin_慕斯7352159
    2019-05-11 16:21:40

    <dl>

    <dt>

    <a href="#">电视<i>&gt;</i></a>

    </dt>

    <dd>

    <a href="#" target='_blank'>合资品牌</a>

    <a href="#" target='_blank'>国产品牌</a>

    <a href="#" target='_blank'>互联网品牌</a>

    </dd>

    </dl> 

    ----------------------------------

     </dt>  <dd> < /dd><dt > 应该包含在 <dl></dl>里面,比如:

    <dl>

         <dt> 

            <dd>

            < /dd>

         </dt>

    </dl>