嘿,我在一组卡片上使用 Jquery Scrollify(非常棒的顺便说一句),通过使用 AngularJS 的 ng-repeat 进行迭代。除了两张包含 Highcharts 柱形图的卡片外,快照和滚动在所有卡片上都可以正常工作。最初我认为“积极:相对”将是问题,但即使将位置调整为静态或初始也没有完成这项工作。我在这里错过了什么吗?
HTML:
<div class="card awareness" ng-if="card['awareness-bar']">
<div class="row">
<div class="col-xs-12">
<p>You've spent a little more<br>at Text this month.</p>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div id="awareness_bar" style="width: 80%; height:100%; margin: 0 auto"></div>
</div>
</div>
</div>
滚动:
$(function() {
$.scrollify({
section : ".card",
sectionName: false,
setHeights: false,
offset: -50,
interstitialSection : ".flow-header"
});
});
CSS:
.card {
background: rgba(117, 117, 117, 0.3);
padding: 14px 11px;
text-align: center;
margin-top: 15px;
box-shadow: 0 2px 3px rgb(65, 64, 66);
}
.awareness {
background-color: rgba(33, 155, 213, 1);
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=rgba(33, 155, 213, 1), endColorstr=rgba(83, 160, 253, 1));
background-image: -moz-linear-gradient(top, rgba(33, 155, 213, 1) 0%, rgba(83, 160, 253, 1) 25%, rgba(81, 183, 236, 1) 100%);
background-image: linear-gradient(top, rgba(33, 155, 213, 1) 0%, rgba(83, 160, 253, 1) 25%, rgba(81, 183, 236, 1) 100%);
background-image: -webkit-linear-gradient(top, rgba(33, 155, 213, 1) 0%, rgba(83, 160, 253, 1) 25%, rgba(81, 183, 236, 1) 100%);
background-image: -o-linear-gradient(top, rgba(33, 155, 213, 1) 0%, rgba(83, 160, 253, 1) 25%, rgba(81, 183, 236, 1) 100%);
background-image: -ms-linear-gradient(top, rgba(33, 155, 213, 1) 0%, rgba(83, 160, 253, 1) 25%, rgba(81, 183, 236, 1) 100%);
background-image: -webkit-gradient(linear, right top, right bottom, color-stop(0%, rgba(33, 155, 213, 1)), color-stop(25%, rgba(83, 160, 253, 1)), color-stop(100%, rgba(81, 183, 236, 1)));
padding-bottom: 40px;
padding-top: 50px;
p {
color: #fff;
font-size: 24px;
}
}