发表于: 2016-01-28 23:08:28

1 1433


准备再写一个浮动的版本,css有写属性都忘了,现在每天都在复习中,这次写的还有一个问题,得不到解决,就是一行中的div间的间距没有办法清除掉,以下的代码部分:

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<style type="text/css">

body,div{

border:0;

margin: 0;

padding: 0;

}

.ense{

width: 330px;

margin:0 auto;

}

/*.one,.two,.tree{

border: 1px solid red;

}*/

.one div,.two div,.tree div{

width: 100px;

height: 100px;

border-radius:10px;

background-color: rgb(232,131,13);

margin-top:6px;

display: inline-block;

}

</style>

<title>Document</title>

</head>

<body>

<div>

            <div class="one">

            <div></div>

            <div></div>

            <div></div>

            </div>

            <div class="two">

            <div></div>

            <div></div>

            <div></div>

            </div>

            <div class="tree">

            <div></div>

            <div></div>

            <div></div>

            </div>

</div>

</body>

</html>




返回列表 返回列表
评论

    分享到