![](/img/trans.png)
[英]Place border in a 100% height and width div - right and bottom border outside
[英]Place many different div elements to the right, each with height and width 100 percent (fullscreen)
即時通訊面臨的問題,我需要一些建議。 我想有幾個主要的div容器,可以說
<div class="main">
一個到另一個在右邊。
是否可以在不使用javascript進行閱讀和設置的情況下將div彼此正確設置? 是否有CSS / HTML解決方案?
例:
<div class="main"><!--to the right one more -->
</div>
<div class="main"><!--to the right one more -->
</div>
<div class="main">
</div>
風格:#這不起作用...
.main{
width:100%;
height:auto;
float: right;
}
我可能誤解了這個問題,但請嘗試
html, body {
height: 100%;
}
body {
width: 300%;
}
.main {
height: 100%;
width: 33.333333333%;
float: left;
}
希望我理解的是您想告訴的。.根據我的理解,您希望將3 div(主)放在一個位組件(容器)中,每個組件的寬度為100%,您可以在檢查時檢查每個div水平滾動...
在你的CSS中
body{
width:300%;
height:100%;
}
.main{
width:100%;
height:100%;
float:left;
}
還有你的html-
<body>
<div class="main"><!--to the right one more -->
</div>
<div class="main"><!--to the right one more -->
</div>
<div class="main">
</div>
</body>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.