我有这个 html
<body id="page-id-login" class="">
<div id="viewport" data-am-control="vertical-layout" >
<div id="container_buttons" data-am-control="vertical-layout" >
<button class="item_vertical btn" >Twitter dinámico</button>
<button class="item_vertical btn">Spinner simple</button>
<button class="item_vertical btn">Spinner personalizado</button>
</div>
</div><!-- END VIEWPORT-->
</body>
这个CSS
#viewport{
width: 480px;
height: 600px;
background: linear-gradient(#a8a8a8, #ebebeb);
}
#container_buttons{
padding: 0 10px;
}
.item_vertical{
display:inline-block;
}
.btn{
font-size: 20px;
color: white;
width: 100%;
padding-top: 5px;
padding-bottom: 5px;
background: linear-gradient(#0088cc, #0044cc);
border-style: solid;
border-width: 1px;
border-color: #0044cc;
border-radius: 5px;
margin-top: 20px;
}
.btn:active{
background: linear-gradient(#0044cc, #0044cc);
border-style: solid;
border-width: 1px;
border-color: #0044cc;
border-radius: 5px;
}
有了这个,我看到了:
http://img805.imageshack.us/img805/3980/capturadepantalla201305i.png
如果我添加到 #container_buttons 这个:
#container_buttons{
margin: 60px;
padding: 0 10px;
}
边缘顶部移动所有内容(不仅是 div #container_buttons),就像您在这张图片中看到的那样(上面有空白)
http://img20.imageshack.us/img20/6738/capturadepantalla201305iz.png
那么......有什么方法可以让边距只移动 id="container_buttons" 的 div?
谢谢!!