Intermediary trading http://www.aliyun.com/zixun/aggregation/6858.html"> SEO diagnostic Taobao customer hosting technology hall
This article is for novices, experts do not read.
When we make web pages, we sometimes add background images to the web pages to beautify the web pages
Now we make Web pages are generally used CSS to control the layout and page effects (css.css files are generally in the same folder with the picture file, and if the same as the Web page file on the outside, then this article No sense of meaning, Oh, we now have to talk about the index.htm file is not in the folder, but separately on the outside, so that visitors can directly access to, and CSS files and image files are on the same Folder, ie: images folder)
CSS according to their location can be divided into three types:
Inline Style
Internal Style Sheet (Internal Style Sheet)
External Style Sheet (External Style Sheet)
But different CSS location will lead to the background picture address written differently. Let's take a look at the manifestations of the three stylesheets below:
Internal style sheet:
External style sheet:
Webmaster learning network -www.zxx6.com
Inline style:
Webmaster learning network -www.zxx6.com
The external style and internal style image address should be correct, just write the name of the picture, and you have added in the location of the head of the page no problem, and now is the inline style of the problem, if you are just simple Use background-image: url (zxx6.jpg) this path, then the picture will not be displayed, only fill in the complete path is as follows (assuming the real address of the picture is: http://www.zxx6.com/images /zxx6.jpg)
Then we should write like this:
Webmaster learning network -www.zxx6.com
, Can show normally.
This is the same conditions, different styles of picture writing. One is the need to complete the picture path, one is because the CSS file in the htm file has a clear path, and do not need to be added again. If for a small page, using embedded style, fill in the full path of the picture, because the use of the picture is small, it does not matter, but for multiple pages, or use the external style is good.
Welcome to reprint this article, reprint, please indicate the way the link: Webmaster www.zxx6.com