当前位置:网站首页>[Web 每日一练] 八色拼图(float)
[Web 每日一练] 八色拼图(float)
2022-04-23 11:24:00 【Nick_Bears】
目标:熟悉float布局
要求:用 float布局 完成八色拼图
图例:
思路:将整体切分成几个小块来处理,float相关参数
实现:
<!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>
*{
margin: 0;
padding: 0;
}
div{
font-size: 30px;
text-align: center;
}
.head{
width: 500px;
height: 100px;
line-height: 100px;
background-color: green;
}
.head div{
width: 100px;
height: 100px;
float: left;
}
.mid{
width: 500px;
height: 350px;
background-color: pink;
}
.mid .left{
width: 300px;
height: 350px;
float: left;
}
.mid .right{
width: 200px;
height: 350px;
float: left;
}
.mid .left .six{
width: 300px;
height: 100px;
line-height: 100px;
background-color: yellow;
}
.mid .left .eight,.mid .left .nine{
width: 150px;
height: 150px;
line-height: 150px;
background-color: silver;
float: left;
}
.mid .left .nine{
color: white;
background-color: black;
}
.mid .left .eleven{
width: 300px;
height: 100px;
line-height: 100px;
background-color: red;
float: left;
}
.mid .right .seven{
width: 200px;
height: 220px;
line-height: 190px;
}
.mid .right .ten{
width: 200px;
height: 130px;
line-height: 130px;
background-color: aqua;
}
.tail{
width: 500px;
height: 100px;
line-height: 100px;
background-color: blue;
}
</style>
</head>
<body>
<div class="head">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
</div>
<div class="mid">
<div class="left">
<div class="six">6</div>
<div class="eight">8</div>
<div class="nine">9</div>
<div class="eleven">11</div>
</div>
<div class="right">
<div class="seven">7</div>
<div class="ten">10</div>
</div>
</div>
<div class="tail">12</div>
</body>
</html>
版权声明
本文为[Nick_Bears]所创,转载请带上原文链接,感谢
https://nickbears.blog.csdn.net/article/details/124357620
边栏推荐
- Résumé de la relation entre GPU, cuda et cudnn
- 学习 Go 语言 0x06:《Go 语言之旅》中 斐波纳契闭包 练习题代码
- Applet payment
- rebbitMQ的简单搭建
- stylecloud ,wordcloud 库学习及使用例子
- Excel · VBA custom function to obtain multiple cell values
- Detailed explanation of writing sequence and execution sequence of MySQL series SQL query statements
- 解析幼儿教育中steam教育的融合
- Interprocess communication -- message queue
- Who said you should know PS? This open-source artifact can also be pulled in batch, and the effect is outstanding!
猜你喜欢
Write console script by laravel
分享两个实用的shell脚本
Upgrade the functions available for cpolar intranet penetration
微型机器人的认知和研发技术
R-drop: a more powerful dropout regularization method
nacos基础(5):nacos配置入门
Database management software sqlpro for SQLite for Mac 2022.30
More reliable model art than deep learning
Mysql8. 0 installation guide
MQ的了解
随机推荐
nacos基础(8):登录管理
MySQL索引优化之分页探索详细介绍
An interesting interview question
laravel 永远返回 JSON 响应
ConstraintLayout布局
The songbird document editor will be open source: starting with but not limited to markdown
Upgrade the functions available for cpolar intranet penetration
Detailed explanation of how to smoothly go online after MySQL table splitting
Database management software sqlpro for SQLite for Mac 2022.30
Implementation of inserting millions of data into MySQL database in 10 seconds
Interprocess communication -- message queue
Facing the global market, platefarm today logs in to four major global platforms such as Huobi
升级cpolar内网穿透能获得的功能
26. Delete duplicates in ordered array
Implementation of partition table of existing data table by MySQL
Study notes of C [8] SQL [1]
小程序 支付
Detailed introduction to paging exploration of MySQL index optimization
Mysql8.0安装指南
解读机器人编程课程的生物认知度