简体   繁体   English

Cycle2滑块CS属性

[英]Cycle2 slider-css attribute

I'm trying to applying custom CSS to each slide in my Cycle2 carousel. 我正在尝试将自定义CSS应用于我的Cycle2轮播中的每个幻灯片。

The attribute, to add to the carousel's conatining div, is: 要添加到轮播的固定div中的属性是:

data-cycle-slide-css

The doc's says that the value should be an 'object hash'. 医生说该值应该是“对象哈希”。

I'm not sure what this means. 我不确定这是什么意思。

I've tried giving it the value: 我试图给它的价值:

"{margin:-30px;}"

But that's not working. 但这不起作用。

Any ideas? 有任何想法吗?

data-cycle-slide-css='{"margin":"-30px"}'

您可以在以下位置的Shuffle演示的Offset Stack部分中查看此语法的示例: http : //jquery.malsup.com/cycle2/demo/shuffle.php

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM