开发者

opacity in jQuery

I wan开发者_Go百科t to make the opacity black ( if possible )

My jQuery is:

jQuery('#list a[rel^="myPhoto"]').my422PortfolioThumbsHover({
    defaultOpacity: 1,
    onMouseOverOpacity: 0.6,
    speed: 300,
    zoomImg: 'zoom.png'
});

I tried adding:

background-color: #000000, into the above code... but doesnt wanna play.

Also thought hmm, perhaps I need to wrap the hex color in ' and ' but again zilch ...

Then wondered if I am just going MAD lol

As it is it whitens opacity on hover to 60% , I need that opacity to be 60% but blackened not whitened.


Cover your element with another and fade that new element from transparent into black. You could cover the element by adding the new element to the same parent and absolutely positioning it over the photo.


Opacity isn't a color. It's the opacity of the object you are applying it too. If you want something to fade from black to nothing, then you need to make an element that is black, and then set the opacity of that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜