开发者

html - body backgorund image is repeating

As you can see in this page - http://www.white-cell.com/events.htm - at the bottom, the background image is repeating because of the long text. the lin开发者_如何学JAVAe that related to this is:

<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" background="images/bg_wide.gif">

thank you!


Use CSS to both specify your background image (background is very deprecated) and to turn off the repeating.

Put this in your head section:

<style type="text/css">
body
 {
     background-image: url(images/bg_wide.gif);
     background-repeat: no-repeat;
 }
 </style>

There is also a property to position the background image (background-position).

more on defining backgrounds at w3schools


You can use this style and keep image from repeating:

body {
  background:url(images/bg_wide.gif) no-repeat;
}

The no-repeat will keep image from repeating.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜