Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/37.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
Jquery 如何将小型base64图像扩展到全屏_Jquery_Css - Fatal编程技术网

Jquery 如何将小型base64图像扩展到全屏

Jquery 如何将小型base64图像扩展到全屏,jquery,css,Jquery,Css,我有一个base64编码的png图像 我写了下面的代码,让它可以全屏显示 [CSS] background: url(data:image/png;base64,/*---Image base64 code--*/)no-repeat center center fixed; -webkit-background-size: cover; -o-background-size: cover; -moz-background-size: cover; background-size:

我有一个base64编码的png图像

我写了下面的代码,让它可以全屏显示

[CSS]
background: url(data:image/png;base64,/*---Image base64 code--*/)no-repeat center center fixed;
-webkit-background-size: cover;
   -o-background-size: cover;
  -moz-background-size: cover;
  background-size: cover;

但没用。我怎样才能做到这一点。

你在身体上使用它吗?如果是,则如下所示

Jsfiddle:


这些属性使用了什么选择器?使用
background
。。。如果您已经指定了颜色参数,那么您输入到
背景图像
的所有其他值都不适用于它,但它们确实适用于
背景
。你看,我错过了后面的那一点。谢谢,修改答案。
body
{
background-image: url(data:image/png;base64,/*---Image base64 code--*/) no-repeat center center fixed;
-webkit-background-size: cover;
   -o-background-size: cover;
  -moz-background-size: cover;
  background-size: cover;
}