简体   繁体   中英

Cycle2 slider-css attribute

I'm trying to applying custom CSS to each slide in my Cycle2 carousel.

The attribute, to add to the carousel's conatining div, is:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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