【发布时间】:2016-09-28 13:58:25
【问题描述】:
当您有很多列(例如 15 列)时,我正在尝试将列正确放置在适当的位置。
这是我正在做的网页截图。
可以看出,我正在尝试做 trello(https://trello.com) 所做的事情。当您有很多列时,您将能够水平滚动。但是在这里,其余不适合页面的列会下降到页面。
这是 trello 的屏幕截图,我想要它做的事情
从截图2可以看出,无论你有多少列,它都可以水平滚动。
这是 HTML 代码:
<div id="background">
<div class="row">
<div class="col-sm-2">
<h3>Objectives 1</h3>
//content of cards here
</div>
<div class="col-sm-2">
<h3>Objectives 2</h3>
//content of cards here
</div>
<div class="col-sm-2">
<h3>Objectives 3</h3>
//content of cards here
</div>
<div class="col-sm-2">
<h3>Objectives 4</h3>
//content of cards here
</div>
<div class="col-sm-2">
<h3>Objectives 5</h3>
//content of cards here
</div>
<div class="col-sm-2">
<h3>Objectives 6</h3>
//content of cards here
</div>
<div class="col-sm-2">
<h3>Objectives 7</h3>
//content of cards here
</div>
<div class="col-sm-2">
<h3>Objectives 8</h3>
//content of cards here
</div>
<div class="col-sm-2">
<h3>Objectives 9</h3>
//content of cards here
</div>
</div>
</div>
这是 CSS 代码:
#background
{
background-color:#9B59B6;
margin: -19px 0 0 0; //this is needed to remove the white space on top of the page
min-height: 100vh; min-width: 100vw;
overflow:hidden;
}
.col-sm-2
{
display: inline-block;
}
我在 ASP.net MVC 6 上执行此操作,它是“cshtml”格式,所以我认为它与 html5 有点不同。(我是新手)
我是网络编程新手,我该怎么做?
请帮忙,谢谢。
【问题讨论】:
标签: html css asp.net twitter-bootstrap