【发布时间】:2019-07-29 20:39:19
【问题描述】:
如何将滚动条放在左边,但让 ng-repeat 从左到右填充
我正在使用 ng-repeat 填充 3 x X(宽度 x 高度)的网格,默认情况下,滚动条在右侧,按照正常的 webview 标准,我想将它放在左侧,所以我使用了direction: rtl;,但问题是现在我的ng-repeat 数据也从右到左填充,但我需要像通常那样从左到右显示数据。
根据我的理解direction:rtl 是将滚动条移动到另一边的唯一方法,是否有一些我缺少的工具可以移动不是direction: rtl 的滚动条,或者是否有另一种方法来翻转我的内容回到ltr?
我的 HTML:
<div class="h-blue-holding-grid">
<div class="blue-holding-item" ng-repeat='img in recipeArray'>
<div class="h-blue-holdingImg"><img src="/imgs/redhead.png" width="45" height="45"></img></div>
<div class="h-blue-smalltime">{{Math.floor(img.data.data.start_time_ms/1000/60)}}:{{img.data.data.start_time_ms/1000%60}}<span ng-if="img.data.data.start_time_ms/1000%60 < 10">0</span></div>
<div class="h-blue-smallfont">{{img.data.data.name}}</div>
</div>
</div>
我的 CSS:
.h-blue-holding-grid{
width: auto;
display: grid;
grid-template-columns: 33% 33% 33%;
grid-gap: 3px 3px;
margin-right: 5vh;
height: 25.5vh;
overflow-y: scroll;
direction: rtl;
}
.blue-holding-item{
width: 100%;
height: 8vh;
text-align: left;
background-image: url(/imgs/gradient_blue.png);
background-size: 20vh 8vh;
color: white;
font-family: "Segoe UI";
font-weight: bold;
display: grid;
grid-template-columns: auto auto;
}
.h-blue-holdingImg{
grid-row-start: 1;
grid-row-end: 3
}
谢谢,
【问题讨论】:
标签: html css angularjs css-grid grid-layout