[英]CSS/CSS3 background auto increase with content
how can i make my backgrounds (eg. header bg or footer bg) to auto expand horizontally with the content i put on any of the main content areas in my code? 如何使我的背景(例如页眉bg或页脚bg)自动随我放置在代码中任何主要内容区域的内容水平扩展? .. :) any help is appreciated.
.. :)任何帮助表示赞赏。 thanks!
谢谢!
There are a few ways that I can think of: 我可以想到几种方法:
width: 100%
). width: 100%
)。 This will fill the entire area regardless of its size. repeat-x
). repeat-x
( repeat-x
)。 I think that this is probably the best solution for you as it doesn't distort the background like when stretched as described above.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.