我目前在一个网站上工作只是为了好玩,甚至更多只是为了学习基础知识^^
所以我想创建一个 Metro 菜单(确实受到 win 8 X3 的启发),所以我让 div 可以用 Jquery 移动。现在我想以正确的方式定位它们:
[ big block ]
[small] [small]
[ big block ]
等等
我得到了前 2 行的完美。现在问题如下:我的第二个大块将像这样放置:
[ big block ]
[small] [small] [ big block ]
或者就在其他 div 后面:/
这里有一些代码可以让我更清楚我的意思 XD:[CSS]
<style>
#facebook{
margin-left:10px;
margin-top:10px;
width:462px;
height:174px;
border:none;
background-color:transparent;
background:none;
background-image:url(buttons/facebook.png);
background-repeat:no-repeat;
background-size:cover;
}
#agenda{
float:left;
margin-left:18px;
margin-top:10px;
width:223px;
height:146px;
border:none;
background-color:transparent;
background:none;
background-image:url(buttons/Agenda.png);
background-repeat:no-repeat;
background-size:cover;
}
#contacts{
float: none;
width: 462px;
height: 174px;
border: none;
background-color: transparent;
background: none;
background-image: url(buttons/Contacts.png);
background-repeat: no-repeat;
background-size: cover;
margin: 10px;
position: relative;
}
</style>
HTML 看起来有点像:
<div id="facebook" class="ui-widget-content"></div>
<div id="desktop" class="ui-widget-content"></div>
<div id="agenda" class="ui-widget-content"></div>
<div id="contacts" class="ui-widget-content"></div>
因此,如果有人知道如何以正确的方式放置 div 的好教程,或者只是一些关于操作方法的解释,那就太棒了!^_^
提前致谢!