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>
        .container1 {
            width: 800px;
            height: 300px;
            border: 1px solid red;
            margin: 0 auto;
        }

        .block1 {
            width: 500px;
            height: 300px;
            background-color: gray;
            float: left;
        }

        .block2 {
            width: 200px;
            height: 300px;
            background-color: black;
            float: left;
        }

        .container2 {
            width: 800px;
            height: 200px;
            border: 1px solid red;
            margin: 0 auto;
            position: relative;
        }

        .block {
            width: 240px;
            height: 160px;
            background-color: black;
            margin: 20px 20px 20px 0;
            float: left;
        }
    </style>
</head>

<body>
    <div class="container1">
        <div class="block1"></div>
        <div class="block2"></div>
    </div>
    <div class="container2">
        <div class="block"></div>
        <div class="block"></div>
        <div class="block"></div>
    </div>
</body>

</html>

 

  <div style="display:flex;justify-content:flex-start;">
	<div style="width:60%;height:200px;background:gray;"></div>
	<div style="width:10%;height:200px;background:black;"></div>
  </div>
  <div style="display:flex;justify-content:space-between;padding-top:10px;">
    <div style="background:black;width:24%;height:200px;"></div>
    <div style="background:black;width:24%;height:200px;"></div>
    <div style="background:black;width:24%;height:200px;"></div>
    <div style="background:black;width:24%;height:200px;"></div>
  </div>

 

您好,我是有问必答小助手,您的问题已经有小伙伴解答了,您看下是否解决,可以追评进行沟通哦~

如果有您比较满意的答案 / 帮您提供解决思路的答案,可以点击【采纳】按钮,给回答的小伙伴一些鼓励哦~~

ps:问答VIP仅需29元,即可享受5次/月 有问必答服务,了解详情>>>https://vip.csdn.net/askvip?utm_source=1146287632