<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>你好小王子!</title></head><body background="G:\我的收藏\大学各种拍摄\photo\SAM_0957.JPG"> //为什么这个图片不能显示在背景上,我的html文件存在了“G:\我的收藏\”上面<h2 dir=ltr>小王子就要诞生了!!!</h2></body></html>
1. The background specifies the picture, which is not written like this.
Go download a CSS2 manual, written by Su Chen Xiaoyu.
Specify the method in CSS: blockquote { background-image: url("image path"); }
In the file code, write
It should be in this format. In addition, it is best not to use Chinese names, as encoding problems may cause errors.
background="../www/My Collection/Various University Shoots/photo/SAM_0957.JPG"
There is no problem with the syntax. I use my own machine and only changed the path of your code. , the background can be displayed. Check whether the photo is really there under your path, or whether the path is written incorrectly. Also, HTML comments do not use //. If you write comments like this, they will be displayed directly on the page. You should use
In other words, you can put the html and pictures directly Just put them together