前端基础知识学习——HtmlCss实例(六)

16 篇文章 1 订阅
12 篇文章 1 订阅

在这里插入图片描述

<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title></title>
    <style>
        body,ul,h2,h3,p{margin:0;padding:0; font-family:"宋体";font-size:12px;}
        li{list-style:none;}
        /*去除图片底部空隙:vertical-align:top;*/
        img{border:none;vertical-align:top; }
        a{text-decoration:none;}
        .wrap{width:366px;background:#f4fafb;margin:30px auto;        }
        .head{height:23px;background:url(headBg.gif) no-repeat;}
        .title{background:url(titleBg.gif) no-repeat 6px 4px;line-height:22px;font-size:12px;color:#294852;padding-left:30px;}
         .list{padding:0 7px 2px 5px;}
            /*li里面的内容浮动,所以要清浮动*/
        .list li{zoom:1;overflow:hidden;vertical-align:top;padding:13px 0 9px 0;}
        .lis .pic{float:left;border:1px solid #c8c4d3;padding:2px;background:#fff;}
    .list .text{width:240px;float:right;}
    .lis h3{line-height:24px;}
        .list h3 a {
            color: #333;
            font-size: 14px;
        }
    .list p{font-size:14px;line-height:22px;}
    .list p a{color:#666;}
    </style>
</head>
<body>
    <div class="wrap">
        <div class="head">
            <h2 class="title">玄机</h2>
        </div>
        <ul class="list">
            <li>
                <a href="#" class="pic">
                    <img src="1.png" alt="Alternate Text" width="100" height="100" />
                </a>
                <div class="text">
                    <h3>  <a>《明月几时有 把酒问青天》</a> </h3>
                    <p>
                        在爱情的事上如果你考虑起自尊心来,那只能有一个原因

                        :实际上你还是最爱自己...[<a href="#">详细</a>]
                    </p>
                </div>
            </li>
        </ul>
        <ul class="list">
            <li>
                <a href="#" class="pic">
                    <img src="2.png" alt="Alternate Text" width="100" height="100"  />
                </a>
                <div class="text">
                    <h3>  <a>《不知天上宫阙 今昔是何年》</a> </h3>
                    <p>为什么讨人喜欢的女人总是嫁给蠢物啊?” “因为有脑子的男人是不娶讨人喜欢的女人的。”...[<a href="#">详细</a>]</p>
                </div>
            </li>
        </ul>
        <ul class="list">
            <li>
                <a href="#" class="pic">
                    <img src="3.png" alt="Alternate Text"  width="100" height="100" />
                </a>
                <div class="text">
                    <h3>  <a>《我欲乘风归去 又恐琼楼玉宇》</a> </h3>
                    <p>爱情要占据一个人莫大的精力,它要一个人离开自己的生活专门去做一个爱人...[<a href="#">详细</a>]</p>
                </div>
            </li>
        </ul>
    </div>
</body>
</html>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值