Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/87.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 可调整大小的背景图像代码调试帮助_Jquery_Css - Fatal编程技术网

Jquery 可调整大小的背景图像代码调试帮助

Jquery 可调整大小的背景图像代码调试帮助,jquery,css,Jquery,Css,下面是我用来调整背景图像大小的代码,其大小与包含背景图像的DIV的大小相同。但是代码似乎有问题。。请有人帮帮我 .Ques // DIV { background:no-repeat url(https://mail.google.com/mail/help/images/greybtn.png) 0 0; width: 400px; height: 300px } .Ques.background-image { width: 100%; position: absolut

下面是我用来调整背景图像大小的代码,其大小与包含背景图像的DIV的大小相同。但是代码似乎有问题。。请有人帮帮我

 .Ques // DIV
{
background:no-repeat url(https://mail.google.com/mail/help/images/greybtn.png) 0 0;
width: 400px;
height: 300px
}
.Ques.background-image 
{
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
}
嗯,试试看:

.Ques // DIV
{
background:no-repeat url(https://mail.google.com/mail/help/images/greybtn.png) 0 0;
background-size:auto;
width: 400px;
height:300px;
}
希望这只能将图像拉伸到自然大小或更小,祝你好运

你的代码有什么问题?它的行为是什么?你想要什么?