It needed a color image which indicate the status of an "object", something like a traffic light, but more than 3 values, in fact, the catalog would be in a base color data.
The joke is that pre-make an image for each color that is defined in the base is not feasible, I thought to show off my knowledge the php GD library
and perhaps create images on the fly from I needed color but, this translated into the time they are generated and sent to the client too, I got the idea to make a transparent image and whose bottom is to change the styles and javascript, color and come in response an ajax call, result: a much more interactive.
Then the effect of the same image with different background colors, an extra tip: use gray below 50% opacity for give the shadow effect.
see also use the property as style.backgroundColor = 'red' the image, to change the background.
0 comments:
Post a Comment