cloud9carousel icon indicating copy to clipboard operation
cloud9carousel copied to clipboard

How to change opacity for particular item

Open airthomas opened this issue 9 years ago • 3 comments

Any method can set opacity for far image ? Many thanks.

airthomas avatar May 04 '16 03:05 airthomas

I would bind the onRendered event to a function that sets the opacity of each carousel item based on the total number of items and the value returned by floatIndex().

specious avatar Jun 30 '16 16:06 specious

See #14 for how to interface with individual items.

specious avatar Sep 28 '16 19:09 specious

This Thread is very old, but since I just had a similar problem, I'll comment...

A very simple CSS-only workaround would be using an attribute-selector for the foreground-item:

.cloud9-item { opacity: 0.7; transition: opacity 0.2s ease; } .cloud9-item[style*="scale(1)"] { opacity: 1; transition: opacity 0.2s ease; }

surml avatar Jun 25 '21 12:06 surml