我希望能够淡化我的.orbit-caption中的某些单独元素(例如h2或按钮)。我已经尝试将CSS3应用于.orbit-caption和个别元素,但没有任何作用......任何想法?
示例标记(应用于.orbit-container的fadein)如下所示。
<section id="carousel">
<div class="row collapse">
<div class="small-12 large-12 columns">
<ul data-orbit>
<li>
<img src="image" />
<div class="orbit-caption">
<h2 class="carousel">Hunting Coolers</h2>
<h3 class="subheader">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</h3>
</div>
</li>
<li>
<img src="image" />
<div class="orbit-caption">
<h2 class="carousel">Fishing Coolers</h2>
<h3 class="subheader">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</h3>
</div>
</li>
</ul>
</div>
</div>
</section>
#carousel .orbit-container .orbit-slides-container > * .orbit-caption {
position: absolute;
bottom: 0;
color: #fff;
width: 100%;
padding: 10px 14px;
font-size: 0.875em;
-webkit-animation: fadein 5s;
-moz-animation: fadein 5s;
-o-animation: fadein 5s;
animation: fadein 5s;
}
答案 0 :(得分:0)
您需要在(通常)初始化Foundation之前设置自定义样式。例如,如果这是您的自定义样式:
.the_coolest_orbit_style {
position: absolute;
bottom: 0;
color: #fff;
width: 100%;
padding: 10px 14px;
font-size: 0.875em;
-webkit-animation: fadein 5s;
-moz-animation: fadein 5s;
-o-animation: fadein 5s;
animation: fadein 5s;
}
使其有效:
$(document).foundation('orbit', {
orbit_transition_class: 'the_coolest_orbit_style'
});
$(document).foundation();