Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/70.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_Twitter Bootstrap - Fatal编程技术网

Jquery 在引导程序中将图像作为背景设置为空行

Jquery 在引导程序中将图像作为背景设置为空行,jquery,css,twitter-bootstrap,Jquery,Css,Twitter Bootstrap,我会使用backstretchjquery插件将一个图像放到一行中。这是一个片段: script $("#img-background").backstretch("/image.jpg"); .container-fluid .row #img-background 通过上面的插件,没有任何东西需要被放置到行中,只是一个背景图像,但不幸的是,由于行是空的,所以图像没有显示。除此之外,我会得到一个图像。宽度图像为1050px。如果我使用背景尺寸:封面不幸的

我会使用backstretchjquery插件将一个图像放到一行中。这是一个片段:

  script
    $("#img-background").backstretch("/image.jpg");

  .container-fluid
    .row
      #img-background
通过上面的插件,没有任何东西需要被放置到行中,只是一个背景图像,但不幸的是,由于行是空的,所以图像没有显示。除此之外,我会得到一个图像。宽度图像为1050px。如果我使用
背景尺寸:封面
不幸的是,图像没有响应。有什么建议让你的形象更具反应力吗

示例


请在代码中添加jsfidle,使图像的宽度响应使用
最大宽度:800px;高度:自动
--您喜欢的任何宽度值。好的,这里有一个示例,您使用的
表示
id
,但是
img background
是一个类,请使用