Jquery 可调整大小的背景图像代码调试帮助
下面是我用来调整背景图像大小的代码,其大小与包含背景图像的DIV的大小相同。但是代码似乎有问题。。请有人帮帮我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
.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;
}
希望这只能将图像拉伸到自然大小或更小,祝你好运 你的代码有什么问题?它的行为是什么?你想要什么?