开发者

modifying background

开发者 https://www.devze.com 2023-01-13 23:37 出处:网络
I am a beginner in HTML and am taking a Multimedia class for school. I noticed for many websites such as ESPN, CNN, Google, etc. that there was no direct image source for the entire background. How mi

I am a beginner in HTML and am taking a Multimedia class for school. I noticed for many websites such as ESPN, CNN, Google, etc. that there was no direct image source for the entire background. How might I be able to incorporate an image for an entire background of a website? Thanks I appreciate it!


OH ok I see the problem, I was in HTML, not CSS. So where do I find the source file? I know in HTML if there is a image placed it will usually 开发者_运维问答be followed by something like img src etc., and the image I want to use I usually copy the image location and paste, is this the same for this? Also I see in the CSS script the words

body {
 margin:0;


Something like that?

With CSS:

body { background-image:url('myImage.gif'); }

Your question is not so clear though...


If you are trying to add the background image into your HTML, I would add it to the body div:

<body background="blue.jpg">

If you want to add it to your CSS or stylesheet, use this:

body {background: url(blue.jpg); }

Does that answer your question?

0

精彩评论

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

关注公众号