开发者

CSS Sprite in a fluid layout

开发者 https://www.devze.com 2023-04-13 09:44 出处:网络
I have a background image to be used for CSS sprite Now the issue is I can only use fluid layout (only %, no px) and the % positioning creates an issue wh开发者_StackOverflow社区ile resizing the br

I have a background image to be used for CSS sprite

CSS Sprite in a fluid layout

Now the issue is I can only use fluid layout (only %, no px) and the % positioning creates an issue wh开发者_StackOverflow社区ile resizing the browser (e.g. some portion of other arrow gets displayed)

How do I fix this ? Can i get an example of how to use % positioning for background ?


A fluid layout and using fixed positioning are not mutually exclusive.

If you have an element on the page that does not expand, for example a button using a sprite background, then using px for size or position is appropriate (arguably mandatory).

0

精彩评论

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

关注公众号