在我的tumblr博客上,我如何让背景成为一个巨大的形象?

时间:2011-12-31 16:30:11

标签: html background blogs tumblr

这是我的tumblr博客:

thestorywithnoending.tumblr.com

博客的代码是我在这里的主题:

http://themes.pouretrebelle.com/lycoris/?download

(只需向下滚动一下,整个代码就在那里)

我希望背景图片只是一张图片......

我知道我的描述性不够,所以要解释一下:我希望它是这样的:

http://chloescheffe.com/

你看到该网站上的背景图片是如何......基本上都是如此。当您更改网页的大小时,背景图像会相应更改吗?

我怎么能在我的tumblr博客上做到这一点?

谢谢:)

2 个答案:

答案 0 :(得分:0)

用css。将bg图像的高度和宽度设置为100%。对不起,我会给你代码,但这个键盘没有更大的所有字符。 使用background-size css属性w3schools.com/cssref/css3_pr_background-size.asp

答案 1 :(得分:0)

您可以使用background-size以两种方式执行此操作。一个人将拉伸图像,一个将正确填充宽度,但切断底部。

要进行拉伸,请将其添加到body CSS:

body {
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

对于宽度填充(这在您当前的博客中看起来更好),请将其添加到您的body CSS:

body {
    background-repeat: no-repeat;
    background-size: cover;
}