开发者

HTML/CSS - shadow image resize

What's the best, most common way of fitting shadow to it's parent?

I want my users to be able to cr开发者_运维百科eate content (divs, spans etc.) with shadows below, and I don't want them to put width/height of the shadows (looks like that's the easiest way):

http://jsfiddle.net/7MyVd/

Any ideas?

jQuery/PHP/HTML5/CSS3 allowed.

The best idea I have is a container + img width = 100% always, but I couldn't figure it out.

jQuery width() looks nice, but doesn't work too well with Nivo sliders etc. (they're sliced and width() outputs 1/10 of their width).


If you place the img inside the div, you can set the width of the image relative to its container.

http://jsfiddle.net/g105b/7MyVd/1/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜