JQuery - drop shadow plugin. Custom color
I'm using Jquery plugin DropShadow: web site
And I want to set drop shadow color manually.
Color is specified in the usual manner, with a color name or hex value. The color parameter does not apply with transparent images.
From documentation, so, here is my code:
{
...
color: "black",
swap: false
}
It works perfect, with '#000' against 'black' it works too... But if I need shadow color, for example, red '#fff000' plugin doesn't work. I do开发者_开发问答n't see any shadow. Why?
The plugin uses css("background", opt.color)
to set the shadow colour - this is a correct and straightforward jQuery method which should work.
I suspect you're not specifying the dropShadow options correctly. If you could include in your question the a sample of your call to the dropShadow plugin this hypotesis could be either proved or discarded.
If you don't specify a colour, the default 'black' is used. If you instead specify the colour as '#000' (the hex representation for black) you'll not be able to tell if you're correctly specifying the desired colour and correctly overriding the in-built default.
According to the documentation, you would need to specify the options as:
$.dropShadow({
color:'<your colour here>'
});
For red you would need to use:
$.dropShadow({
color:'#f00'
});
Include in your question the relevant call to $.dropShadow()
if this doesn't work.
精彩评论