HTMLcss练习题1

在这里插入图片描述

<!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: 500px;
            margin: 20px auto;
            border: 3px solid #ccc;
           
        }
        ul{
            width: 420px;
            margin: 20px 20px;
            border: 1px solid #ccc;
            padding: 20px;
        }
        li{
            border-bottom:1px solid gray;
            line-height: 30px;
            color: #122e67;
            list-style-image: url(./disc.jpg);
        }
    </style>
</head>
<body>
    <div>
        <ul>
            <li>111111111</li>
            <li>111111111</li>
            <li>111111111</li>
            <li>111111111</li>
            <li>111111111</li>
            <li>111111111</li>
        </ul>
    </div>
</body>
</html>

在这里插入图片描述

<!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>
       
        .main{
            width: 1210px;
            margin: 10px auto;
            background-color: #ccc;
            border: 3px solid #ccc;
        }
        ul{
            padding:0px;
            margin: 2px auto;
            width: 1200px;
            
        }
        li{
            display: inline-block;
            width: 216px;
            height: 200px;
            list-style: none;
            padding-left: 20px;
            padding-top: 20px;
            margin: 2px auto;
            background-color: #fff;
        }
        img{
            width: 154px;
            margin-left: 60px;
        }
        .one{
            font-size: 18px;
            color: #000;
        }
        .two{
            font-size: 14px;
            color: #64c333;
        }
    </style>
</head>
<body>
    <div class="main">
        <ul>
            <li>
                <span class="one">抱抱果新首发</span>
                <br>
                <span class="two">抱一下就幸福</span>
                <img src="./1.jpg" alt="">
            </li>
            <li>
                <span class="one">天猫冰箱节</span>
                <br>
                <span class="two">智由随风</span>
                <img src="./2.jpg" alt="">
            </li>
            <li>
                <span class="one">西门子全球精选</span>
                <br>
                <span class="two">旗舰精品享你所想</span>
                <img src="./3.jpg" alt="">
            </li>
            <li>
                <span class="one">进口葡萄酒专场</span>
                <br>
                <span class="two">原瓶进口品质保证</span>
                <img src="./4.1.jpg" alt="">
            </li>
            <li>
                <span class="one">手机专场</span>
                <br>
                <span class="two">原装正品</span>
                <img src="./5.1.jpg" alt="">
            </li>
        </ul>
    </div>
</body>
</html>

在这里插入图片描述

<!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>
        .main{
            width: 700px;
            margin: 10px auto;
        }
        .one{
            width: 250px;
            height: 320px;
            margin: 10px 10px ;
            padding: 10px;
            border: 1px solid #ccc;
            font-size: 12px;
            color: #66667f;
            line-height: 25px;
        }
        .first{
            font-size: 14px;
            color: #666;
            line-height: 32px;
            text-overflow: ellipsis;
            overflow: hidden;
            white-space: nowrap;
        }
        li{
            list-style: none;
        }
        .yuan{
            color: #ff5587;
        }
        .red{
            color: red;
        }
        .img{
            width: 250px;
            height: 188px;
        }
    </style>
</head>
<body>
    <div class="main">
        <ul>
            <div class="one">
                <img class="img" src="./pic1.jpg" alt="">
                
                <li class="first">动画便利店X果壳网《西门子洗碗机囧囧》</li>
                <li><b class="yuan">原创作品</b>-影视-Motion Graphic</li>
                <li>2小时前上传</li>
                <li>
                    <span class="red">1284</span>  人气/<span class="red">11</span>  评论/<span class="red">47</span>  推荐
                    
                </li>
                <li>
                    <img src="./play.png" alt="">
                </li>
            </div>
            <div class="one">
                <img class="img" src="./pic2.gif" alt="">
                <li class="first">动画便利店X视知《到底工资怎么发才够》</li>
                <li><b class="yuan">原创作品</b>-影视-Motion Graphic</li>
                <li>3小时前上传</li>
                <li>
                    <span class="red">1569</span>  人气/<span class="red">50</span>  评论/<span class="red">125</span>  推荐
                    
                </li>
                <li>
                    <img src="./play.png" alt="">
                </li>
            </div>
        </ul>
    </div>
</body>
</html>

在这里插入图片描述

<!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>
        li{
            list-style: none;
            line-height: 50px;
        }
        img{
            margin: 10px auto;
            float: left;
            margin-right: 20px;
        }
        .main{
            width: 840px;
            margin: 10px auto;
        }
        .list:hover{
            background-color: #f8f8f8;
        }
        .list{
            border-top: 2px solid #ccc;
            height: 230px;
        }
        .first{
            font-size: 20px;
            font-family: 黑体;

        }
        .yellow{
            color: #cccc00;
            font-size: 16px;

        }
        .lag{
            background-color: #eee;
            color: #999;
            font-size: 14px;
        }
        .radius{
            border: 1px solid #eee;
            border-radius: 25px;
        }
        ul{
            margin-top: 40px;
        }
    </style>
</head>
<body>
    <div class="main">
        
            <div class="list">
                <img src="./4.jpg" alt="">
                <ul>
                <li class="first">不只有看肤色挑唇色 选对口红衣服更美</li>
                <li><span class="yellow">标签</span> <span class="lag">唇膏</span> <span class="lag">衣服</span> <span class="lag">粉色</span> <span class="lag">化妆</span> <span class="lag">美容美体</span></li>
                <li><span class="radius">悦己self</span> 2016-10-18</li>
            </ul>
            </div>
            <div class="list">
           
                <img src="./5.jpg" alt="">
                <ul>
                <li class="first">雪花红唇妆 让你的女王范分分钟秒杀路人</li>
                <li><span class="yellow">标签</span> <span class="lag">唇膏</span> <span class="lag">衣服</span> <span class="lag">粉色</span> <span class="lag">化妆</span> <span class="lag">美容美体</span></li>
                <li><span class="radius">毛戈平形象艺术学校</span> 2016-10-18</li>
            </ul>
            </div>
            <div class="list">
                
                <img src="./6.jpg" alt="">
                <ul>
                <li class="first">无数次给国外博主跪了把自己的脸画成漫画人物好逼真</li>
                <li><span class="yellow">标签</span> <span class="lag">美容美体</span></li>
                <li><span class="radius">八公举</span> 2016-10-18</li>
            </ul>
            </div>
        
    </div>
</body>
</html>

在这里插入图片描述

<!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>
        .top {
            width: 100%;
            height: 50px;
            background-color: dimgray;
            color: #fff;
            font-size: 20px;

        }

        .top li {
            text-decoration: underline;
            list-style: none;
            float: left;
            margin-left: 100px;
            line-height: 50px;
        }

        .one ,.two, .three ,    .four {
            float: left;
            width: 798px;
            margin: 50px 50px;

        }

        .body li {
            list-style: none;
            line-height: 50px;

        }
        .body li::after{
            content: "2018-10-1";
            float: right;
        }
        .bottom{
            width: 100%;
            float: left;
            text-align: center;
            margin-top: 30px;
        }
    </style>
</head>

<body>
    <div class="main">
        <div class="top">
            <ul>
                <li style="color: red;">首页</li>
                <li>新闻</li>
                <li>体育</li>
                <li>娱乐</li>
                <li>财经</li>
                <li>科技</li>
                <li>手机</li>
                <li>数码</li>
            </ul>
        </div>
        <div class="body">
            <div class="one">
                <h1>娱乐新闻</h1>
                <ul>
                    <li>111111111</li>
                    <li>111111111</li>
                    <li>111111111</li>
                    <li>111111111</li>
                </ul>
            </div>
            <div class="two">
                <h1>军事新闻</h1>
                <ul>
                    <li>111111111</li>
                    <li>111111111</li>
                    <li>111111111</li>
                    <li>111111111</li>
                </ul>
            </div>
            <div class="three">
                <h1>数码新闻</h1>
                <ul>
                    <li>111111111</li>
                    <li>111111111</li>
                    <li>111111111</li>
                    <li>111111111</li>
            </div>
            <div class="four">
                <h1>手机新闻</h1>
                <ul>
                    <li>111111111</li>
                    <li>111111111</li>
                    <li>111111111</li>
                    <li>111111111</li>
                </ul>
            </div>
        </div>
        <div class="bottom">
            <a href="">关于我们</a>
            <a href="">联系我们</a></a>
        </div>
    </div>
</body>

</html>

在这里插入图片描述

<!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>
        form{
            width: 248px;
            height: 220px;
            background-color: #f5eae8;
            padding: 30px 40px;
            border: 1px solid #f5eae8;
        }
        .username ,.password{
            width: 250px;
            height: 38px;
            border: 1px solid #ccc;
            margin-bottom: 30px;
            text-indent: 50px;
            background-color: #f5eae8;
        }
        button{
            width: 255px;
            height: 44px;
            margin: 25px auto;
            background-image: url(./but.jpg);

        }
        .bottom{
            width: 330px;
            height: 145px;
            background-color: #f5eae8;
            border-top: 1px solid #ddd;
            text-align: center;
            padding-top: 30px;
        }
        .username{
            background-image: url(./zhanghao.jpg) ;
            background-repeat: no-repeat;
        }
        .password{
            background-image: url(./mima.jpg) ;
            background-repeat: no-repeat;
        }
    </style>
</head>
<body>
    <form action="">
        <input type="text" class="username" placeholder="用户名/邮箱地址/手机号">
        <input type="text" class="password" placeholder="填写密码">
        <div>
            <input type="checkbox">
            <span>记住密码</span><span style="color: gray;"> 欢迎注册 忘记密码</span>
        </div>
        <button class="btn"></button>
    </form>
    <div class="bottom">
        合作网站账号登录:<img src="./weixin.png" alt=""><img src="./qqlogin.png" alt=""><img src="./taobao.png" alt="">
    </div>
</body>
</html>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

天金小麻花

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值