Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change opacity for particular item #11

Open
airthomas opened this issue May 4, 2016 · 3 comments
Open

How to change opacity for particular item #11

airthomas opened this issue May 4, 2016 · 3 comments
Labels

Comments

@airthomas
Copy link

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

@specious
Copy link
Owner

specious commented Jun 30, 2016

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
Copy link
Owner

See #14 for how to interface with individual items.

@specious specious changed the title opacity far image How to change opacity for particular item Nov 29, 2016
@surml
Copy link

surml commented Jun 25, 2021

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; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants