首页 > 其他 > 详细

Task4

时间:2017-12-26 21:39:32      阅读:236      评论:0      收藏:0      [点我收藏+]

技术分享图片

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>定位和居中问题|百度前端学院</title>
    <link rel="stylesheet" href="css/task4.css">
</head>
<body>
    <div class="content">
        <div class="content-top">
        </div>
        <div class="content-bottom">
        </div>
    </div>
</body>
</html>
.content{
    width: 400px;
    height: 200px;
    background-color: #ccc;
    margin: 200px auto;
    position: relative;
}

.content-top{
    position: absolute;
    width: 50px;
    height: 50px;
    background-color: #fc0;
    border-radius: 0 0 100% 0;
    top: 0;
    left: 0;
}

.content-bottom{
    position: absolute;
    background-color: #ffcc00;
    width: 50px;
    height: 50px;
    border-radius: 100% 0 0 0;
    bottom: 0;
    right: 0;
}

技术分享图片

 

Task4

原文:https://www.cnblogs.com/caicairui/p/8120029.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!