发表于: 2017-07-27 14:57:18
1 404
整了半天,开始浮动感觉不对,所以用不同颜色,好知道自己浮动哪里出问题,clear清除弄半天不行,就多加了个变量jiuk.width先用像素代替,下次再换。这次先到这里。麻烦师兄点评哈。
<!DOCTYPE html>。
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
#jiu1{
width: 500px;
height: 500px;
background: silver ;
float: left;
border: 10px solid white;
}
#jiu2{
width: 500px;
height: 500px;
background: pink ;
float: left;
border: 10px solid white;
}
#jiu3{
width: 500px;
height: 500px;
background: blue;
float: left;
border: 10px solid white;
}
#jiuk{
height: 0px;
clear: both;
}
#jiu4{
width: 500px;
height: 500px;
background: blue;
float: left;
border: 10px solid white;
}
#jiu5{
width: 500px;
height: 500px;
background: black;
float: left;
border: 10px solid white;
}
#jiu6{
width: 500px;
height: 500px;
background: yellow;
float: left;
border: 10px solid white;
}
#jiu7{
width:500px;
height: 500px;
background: gray;
float: left;
border: 10px solid white;
}
#jiu8{
width: 500px;
height: 500px;
background: green;
float: left;
border: 10px solid white;
}
#jiu9{
width: 500px;
height: 500px;
background: red;
float: left;
border: 10px solid white;
}
</style>
</head>
<body>
<div id="jiu1"></div>
<div id="jiu2"></div>
<div id="jiu3"></div>
<div id="jiuk"></div>
<div id="jiu4"></div>
<div id="jiu5"></div>
<div id="jiu6"></div>
<div id="jiuk"></div>
<div id="jiu7"></div>
<div id="jiu8"></div>
<div id="jiu9"></div>
</body>
</html>
评论