Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/sql-server-2008/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 在背景图像上写入文本_Html_Css - Fatal编程技术网

Html 在背景图像上写入文本

Html 在背景图像上写入文本,html,css,Html,Css,我试图为整个网站制作一个图像。它起作用了!但我需要更多的东西,我试着在这张图片上创建网站。我需要在上面做个div。我尝试这样做: 欧盟跨系统 html{ 背景:url('http://monster.pwoj.pl/images/main_background.jpg')没有固定的重复中心; -webkit背景尺寸:封面; -moz背景尺寸:封面; -o-背景尺寸:封面; 背景尺寸:封面; } ASDF 只需删除背景色:#fff来自身体。 或添加背景:透明只需删除背景色:#fff来自身体。

我试图为整个网站制作一个图像。它起作用了!但我需要更多的东西,我试着在这张图片上创建网站。我需要在上面做个div。我尝试这样做:


欧盟跨系统
html{
背景:url('http://monster.pwoj.pl/images/main_background.jpg')没有固定的重复中心;
-webkit背景尺寸:封面;
-moz背景尺寸:封面;
-o-背景尺寸:封面;
背景尺寸:封面;
}
ASDF

只需删除背景色:#fff来自身体。
或添加背景:透明

只需删除背景色:#fff来自身体。
或添加背景:透明

将您的样式赋予正文而不是html

body{
    background: url('http://monster.pwoj.pl/images/main_background.jpg') no-repeat center center fixed; 
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}

将您的样式设置为body而不是html

body{
    background: url('http://monster.pwoj.pl/images/main_background.jpg') no-repeat center center fixed; 
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}

我必须更改正文上的html。我必须更改正文上的html。看来您的代码工作正常[没有空格]。复制了您的代码并在Chrome“”中进行了尝试。似乎您的代码按预期工作[没有空格]。已复制您的代码并在Chrome“”中尝试