web实验一

 1.应用html和css完成如图所示界面效果。内容相对于浏览器居中,图标见附件disc.jpg。

说明:

  • 内容相对于浏览器居中,图标见附件disc.jpg
  • 盒子边框1px solid #ccc,内边距20px
  • 文本字体颜色#122e67,文本高度30px
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 480px;
            margin: 0 auto;
            border: 1px solid #ccc;
            padding: 20px;
        }
        li {
            list-style: none;
            list-style-image: url('./images1/disc.jpg');
            color: #122e67;
            line-height: 30px;
            border-bottom: 1px dotted #ccc;
        }
    </style>
</head>
<body>
    <div>
        <ul>
            <li>要装自己的粮食</li>
            <li>要装自己的粮食</li>
            <li>本质区别</li>
            <li>意味深长</li>
            <li>60周年</li>
            <li>回应</li>
        </ul>
    </div>
</body>
</html>

2.完成如下图所示界面设计效果

说明:

  • 可考虑基于列表进行设计,居中显示
  • 将列表转换为inline-block实现横向显示,每项高200px 宽216px,上、左内间距20px
  • 上部字体大小18px,颜色#000,下部字体大小14px,颜色#64C333
  • 所需图片见附件,图片宽度154px,左间距60px
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
       .box {
        margin: 0 auto;
        font-size: 0;
       }
        li {
            height: 200px;
            width: 216px;
            list-style: none;
            display: inline-block;
            padding-top: 20px;
            padding-left: 20px;
            border: 4px solid #ccc;
            border-right: 2px solid #ccc;;

        }

        .top {
            font-size: 18px;
            color: #000;
        }

        .bottom {
            font-size: 14px;
            color: #64c333;
        }

        img {
            width: 154px;
            margin-left: 60px;
        }
    </style>
</head>

<body>
    <div class="box">
        <ul>
            <li>
                <div class="top">抱抱果新首发</div>
                <div class="bottom">抱一下就幸福</div>
                <img src="./images1/1.jpg">
            </li>
            <li>
                <div class="top">冰箱节</div>
                <div class="bottom">智由随风</div>
                <img src="./images1/2.jpg">
            </li>
            <li>
                <div class="top">全球精选</div>
                <div class="bottom">旗舰精品享你所想</div>
                <img src="./images1/3.jpg">
            </li>
            <li>
                <div class="top">葡萄酒专场</div>
                <div class="bottom">原装品质保证</div>
                <img src="./images1/4.jpg">
            </li>
            <li>
                <div class="top">手机专场</div>
                <div class="bottom">原装正品</div>
                <img src="./images1/5.jpg">
            </li>
        </ul>
    </div>

</body>

</html>

三、完成下图所示的静态网页制作

说明:

  • 可考虑基于列表进行设计,居中显示
  • 列表项高320px 宽250px,外间距10px,内间距10px,边框线1px solid #ccc
  • 每项中第一行文字14px,颜色#666,文本行高度32px。其他行文字12px,颜色#66667F,文本行高度25px
  • “原创作品”加粗,颜色#FF5584
  • 所需图片见附件,图片宽度250px,高度188px
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        ul li{
            list-style: none;
            width: 250px;
            height: 320px;
            margin: 10px;
            padding: 10px;
            border: 1px solid #ccc;
            margin: 0 auto;
        }
        img :first-child{
            width: 250px;
            height: 188px;
        }
        .one {
            font-size: 14px;
            color: #666;
            line-height: 32px;
        }
        .other {
            font-size: 12px;
            color: #66667F;
            line-height: 25px;
        }
        .origin {
            font-weight: bold;
            color: #FF5584;
        }
        .num {
            color: red;
        }
    </style>
</head>

<body>
    <ul>
        <li>
            <img src="./images1/pic1.jpg">
            <div class="one">动画便利店X果壳网《西门子洗碗机...</div>
            <div class="other">
                <span class="origin">原创作品</span>-影视-Motion Graphic
                <br>
                2小时前上传
                <br>
                <div>
                    <span class="num">1284</span>
                    &nbsp;
                    人气/<span class="num">11</span>
                    &nbsp;
                    评论/<span class="num">47</span>
                    &nbsp;
                    推荐
                </div>
                <img src="./images1/play.png">

            </div>
        </li>
        <li>
            <img src="./images1/pic2.gif">
            <div class="one">动画便利店X视知《到底怎么发...</div>
            <div class="other">
                <span class="origin">原创作品</span>-影视-Motion Graphic
                <br>
                3小时前上传
                <br>
                <div>
                    <span class="num">1569</span>
                    &nbsp;
                    人气/<span class="num">50</span>
                    &nbsp;
                    评论/<span class="num">125</span>
                    &nbsp;
                    推荐
                </div>
                <img src="./images1/play.png">
        </li>
    </ul>
</body>

</html>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值