发表于: 2016-03-30 00:14:04

1 1888


今天学到的东西:

花了两天时间把html和CSS的知识全部过了一遍,今天重点复习了一下制作九宫格的相关知识点,开始编写九宫格代码:

 <!DOCTYPE HTML>
<html>
<head>
<title>task1</title>
<style type="text/css">
div{width:125px;
height:125px;
background-color: orange;
margin:6px;
float:left;
border-radius:20px;
}
.div4{clear:left;}
.div7{clear:left;}
</style>
</head>
<body>
<div></div><div></div><div></div>
<div class="div4"></div><div></div><div></div>
<div class="div7"></div><div></div><div></div>
</body>
</html>

对margin,float.border-radius三种属性应用的更熟练了,对清除浮动也有了更深的认识。

明天要做的事:

明天开始配置nginx, 并对手机的兼容进行学习。

遇到的问题:

试着换了一种表达方式:

<!DOCTYPE HTML>
<html>
<head>
<style>
.div{width:125px;
height:125px;
background-color: orange;
margin:6px;
float:left;
border-radius:20px;
}
.div4{clear:left;}
.div7{clear:left;}
</style>
</head>
<body>
<div class="div"></div><div class="div"></div><div class="div"></div>
<div class="div4"></div><div class="div"></div><div class="div"></div><div class="div"></div>

<div class="div7"></div><div class="div"></div><div class="div"></div><div class="div"></div>

</body>

</html>

希望学长帮我看看,两种方法哪个更好一些,出于代码的简洁的角度看,感觉第一种好一些。








返回列表 返回列表
评论

    分享到