发表于: 2017-04-18 00:13:37
2 634
写了任务1,方块可以随着页面大小变化,但是小于一定的像素时就不能再缩小而会显示不全.还没有看任务2,暂时没有把代码上传到github.
HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="css/new_file.css"/>
<title></title>
</head>
<body>
<div class="out">
<div class="in"></div>
<div class="in"></div>
<div class="in"></div>
<div class="in"></div>
<div class="in"></div>
<div class="in"></div>
<div class="in"></div>
<div class="in"></div>
<div class="in"></div>
</div>
</body>
</html>
-------
CSS:
* {
margin: 0;
padding: 0;
}
.out {
width: 90%;
margin: 0 5%;
}
.in {
width: 27%;
padding-bottom: 27%;
background-color: orange;
margin: 3%;
float: left;
border-radius: 10px;
}
评论