Task4

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

 

相关文章:

  • 2022-01-08
  • 2021-04-22
  • 2022-01-04
  • 2022-01-23
  • 2021-06-04
  • 2021-12-08
  • 2021-07-28
  • 2021-08-08
猜你喜欢
  • 2021-10-29
  • 2021-04-24
  • 2021-05-20
  • 2021-04-29
  • 2021-10-19
  • 2021-10-28
相关资源
相似解决方案