0

How can I make the Carousel-Arrows changing their colors, depending on the picture displayed beneath them?

For example, if I have a bright picture, arrows are black; when I have a dark Picture, arrows are white.

Here is an example of the effect: http://www.herschelsupply.com/

Thank You!

4

1 に答える 1

2

BackgroundCheckという興味深い jQuery プラグインをご覧になることをお勧めします。

http://www.kennethcachia.com/background-check/

このプラグインは、背後にある画像の明るさに応じて、要素の暗いバージョンまたは明るいバージョンに自動的に切り替えます。

Github から最小化されたバージョンをダウンロードします: https://raw.githubusercontent.com/kennethcachia/Background-Check/master/background-check.min.js

使い方:

要素がいずれかの画像と重なる場合、.background--dark または .background--light が追加されます。BackgroundCheck は要素のスタイルを変更しません — CSS を使用して変更する必要があります。

p.background--light {
  color: black;
}

詳細については、https : //github.com/kennethcachia/Background-Check のドキュメントを参照してください。

于 2014-08-06T19:49:51.640 に答える