昵称ᨐ 2021-06-02 14:03 采纳率: 66.7%
浏览 107
已结题

页面布局,各元素间距10px

 

  • 写回答

4条回答 默认 最新

  • CSDN专家-林老师 2021-06-02 14:13
    关注
    <!DOCTYPE html>
    <html lang="zh">
    <head>
    	<meta charset="UTF-8">
    	<title>Document</title>
    	<style>
    		.container {
    			width: 800px;
    			height: 600px;
    			float: left;
    		}
    		.header, .footer {
    			width: 800px;
    			float: left;
    		}
    		.header {
    			height: 100px;
    			margin-bottom: 10px;
    			background-color: blue;
    		}
    		.main-left, .main-right {
    			float: left;
    			background-color: red;
    			height: 380px;
    		}
    		.main-left {
    			width: 500px;
    			margin-right: 10px;
    		}
    		.main-right {
    			width: 290px;
    		}
    		.footer {
    			height: 100px;
    			margin-top: 10px;
    			background-color: blue;
    		}
    	</style>
    </head>
    <body>
    	<div class="container">
    		<div class="header"></div>
    		<div class="main-left"></div>
    		<div class="main-right"></div>
    		<div class="footer"></div>
    	</div>
    </body>
    </html>

    如上,满意请采纳哦,谢谢。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

问题事件

  • 已结题 (查看结题原因) 3月28日

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器