前端:圆角和浮动的应用

 

<!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>

        .wrap{

            width: 500px;

            height: 410px;

            background-color: #f80;

            border: 1px solid gray;

        }

        .leftear{

            width: 100px;

            height: 100px;

            border-radius: 50%;

            background-color: black;

            border: 1px solid gray;

            float: left;

        }

        .rightear{

            width: 100px;

            height: 100px;

            border-radius: 50%;

            background-color: black;

            border: 1px solid gray;

            float: right;

        }

        .face{

            width: 400px;

            height: 400px;

            border-radius: 50%;

            background-color: pink;

            margin-left: 50px;

        }

        .lefteye{

            width: 100px;

            height: 150px;

            border-radius: 50%;

            background-color: black;

            float: left;

            margin-left: 50px;

            margin-top: 44px;

        }

        .righteye{

            width: 100px;

            height: 150px;

            border-radius: 50%;

            background-color: black;

            float: right;

            margin-right: 45px;

            margin-top: 44px;

        }

        .mouth{

            width: 200px;

            height: 100px;

            border-radius: 50%;

            background-color: red;

            float: left;

            margin-top: 50px;

            margin-left: 100px;

        }

    </style>

</head>

<body>

    <!--底层方块-->

    <div class="wrap">

        <!--左右耳朵》脸》眼睛》嘴巴-->

        <div class="leftear"></div>

        <div class="rightear"></div>

        <div class="face">

            <div class="lefteye"></div>

            <div class="righteye"></div>

            <div class="mouth"></div>

        </div>

    </div>

</body>

</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值