欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

CSS图文混排 采用dl dt dd

shiping1 的头像

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>图文混排</title>
<style>
* {
margin:0;
padding:0;
}
body {
background:#fff;
}
#wrap {
width:502px;
margin:10px auto 0 auto;
}
#wrap dl {
width:480px;
margin-bottom:8px;
padding:8px;
border:1px solid #ddd;
}
#wrap dl dt {
float:right;
width:366px;
height:22px;
}
#wrap dl dt a {
font-size:13px;
font-weight:800;
color:#06c;
text-decoration:none;
}
#wrap dl dt a:hover {
text-decoration:underline;
}
#wrap dl dd.pic {
float:left;
}
#wrap dl dd.pic a {
display:block;
border:1px solid #ddd;
}
#wrap dl dd.pic a img {
width:100px;
height:86px;
margin:2px;
border:0;
}
#wrap dl dd.pic a:hover {
border:1px solid #999;
}
#wrap dl dd.text {
float:right;
width:366px;
font-size:12px;
line-height:19px;
color:#666;
text-indent:2em;
}
#wrap dl dd.links {
float:right;
width:366px;
margin-top:-6px;
text-align:right;
}
#wrap dl dd.links a {
font-size:12px;
line-height:15px;
color:#06c;
text-decoration:none;
}
#wrap dl dd.links a:hover {
text-decoration:underline;
}
#wrap dl:after {
    content:".";
    display:block;
    height:0;
    clear:both;
    visibility:hidden;
}

</style>
</head>

<body>
<div id="wrap">
    <dl>
        <dt><a href="#" target="_blank">图文并排好方法</a></dt>
        <dd class="pic"><a href="#"><img src="http://www.tmxhx.com/attachments/month_0807/b200873134052.jpg" alt="1" /></a></dd>
   <dd class="text">       这个方法确实不错,排版也很漂亮,本CSS代码来自52CSS哦,再次推荐一下52CSS算是我的CSS启蒙老师,那时候不会就天天上去看资料,不会写就天天看CSS样式表…</dd>
        <dd class="links"><a href="#">来自52CSS</a> <a href="#" target="_blank">点击访问</a></dd>
    </dl>
     <dl>
        <dt><a href="#" target="_blank">图文并排好方法</a></dt>
        <dd class="pic"><a href="#"><img src="http://www.tmxhx.com/attachments/month_0807/b200873134052.jpg" alt="1" /></a></dd>
   <dd class="text">       这个方法确实不错,排版也很漂亮,本CSS代码来自52CSS哦,再次推荐一下52CSS算是我的CSS启蒙老师,那时候不会就天天上去看资料,不会写就天天看CSS样式表…</dd>
        <dd class="links"><a href="#">来自52CSS</a> <a href="#" target="_blank">点击访问</a></dd>
    </dl>
     <dl>
        <dt><a href="#" target="_blank">图文并排好方法</a></dt>
        <dd class="pic"><a href="#"><img src="http://www.tmxhx.com/attachments/month_0807/b200873134052.jpg" alt="1" /></a></dd>
   <dd class="text">       这个方法确实不错,排版也很漂亮,本CSS代码来自52CSS哦,再次推荐一下52CSS算是我的CSS启蒙老师,那时候不会就天天上去看资料,不会写就天天看CSS样式表…</dd>
        <dd class="links"><a href="#">来自52CSS</a> <a href="#" target="_blank">点击访问</a></dd>
    </dl>
     <dl>
        <dt><a href="#" target="_blank">图文并排好方法</a></dt>
        <dd class="pic"><a href="#"><img src="http://www.tmxhx.com/attachments/month_0807/b200873134052.jpg" alt="1" /></a></dd>
   <dd class="text">       这个方法确实不错,排版也很漂亮,本CSS代码来自52CSS哦,再次推荐一下52CSS算是我的CSS启蒙老师,那时候不会就天天上去看资料,不会写就天天看CSS样式表…</dd>
        <dd class="links"><a href="#">来自52CSS</a> <a href="#" target="_blank">点击访问</a></dd>
    </dl>
  
</div>
</body>
</html>

实例图:



来自 http://hi.baidu.com/izmwbupoybbkstq/item/101fb70746471b38f3eafca8
普通分类: