您好我想創建一個效果存檔像下面如何以響應的方式創建水平元素?
桌面
//lines up items vertically
----------------------------
| --------------
| | item1 |
| | |
| --------------
| --------------
| | item2 |
| | |
| --------------
| --------------
| | item3 |
| | |
| --------------
在電話
效果,
----------------------------
| -------------- -----------------
| | item1 | | item2 |
| | | | | //line up horizontally for all items
| -------------- -----------------
|
----------------------------
我使用的角度,這裏是我的代碼。
<div class="row">
<div class="item-container col-xs-12 col-lg-4">
<ul>
<li ng-repeat="item in items">
<div>{{item.name}}</div>
//other html to show items infos...
</li>
</ul>
<div>
</div>
在電話,我只能有一個行項目有限(只能容納3項),它會4項推到下一行,因爲item-container
沒有足夠的寬度。我需要我的所有物品(超過10個)水平顯示。有沒有辦法做到這一點?
非常感謝!
ü要所有項目在屏幕上看到一次,或者當用戶掃描剩餘顯示?只是想讓它們水平放置?如果您提供了10個項目,則可以使用%eg- width中的寬度:10%父容器寬度爲100% – Nielarshi 2015-04-05 04:46:06
我想用來查看部分項目,並且可以向右滑動查看其餘項目。 – GeekSquard 2015-04-05 05:05:38
轉到水平傳送帶。 http://blog.revolunet.com/angular-carousel/ – Nielarshi 2015-04-05 05:09:44