Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/32.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 我的Div的背景图像赢得了&x27;不显示_Html_Css_Background_Background Image - Fatal编程技术网

Html 我的Div的背景图像赢得了&x27;不显示

Html 我的Div的背景图像赢得了&x27;不显示,html,css,background,background-image,Html,Css,Background,Background Image,我无法获取要显示的容器Div的背景图像。另一件事是为什么我的摩托车照片周围的边界如此巨大?它是否应该尽可能接近所包含图片的大小?我完全困惑了!提前感谢您的帮助 以下是我的HTML代码: <!DOCTYPE html> <html> <head> <title> </title> <link rel="stylesheet" href="Random Quote Machine.css"> </head&g

我无法获取要显示的
容器Div
的背景图像。另一件事是为什么我的摩托车照片周围的边界如此巨大?它是否应该尽可能接近所包含图片的大小?我完全困惑了!提前感谢您的帮助

以下是我的HTML代码:

<!DOCTYPE html>
<html>
<head>
  <title> 
  </title>
  <link rel="stylesheet" href="Random Quote Machine.css">
</head>

<div class ="container">
    <div class="Motorcycle">
        <h1>Random Quote Machine</h1>
        <img src="https://s25.postimg.org/hxygqincv/Motorcycle_Helmet.jpg"> 
    </div>
</div>

<body>
</html>
这是我目前的输出:

背景图像:url(“img_tree.png”); 从url“./”的开头删除。 更改Css

background-image: url("../https://s25.postimg.org/exhm9rejz/galaxy-s8_overview_kv_type1.jpg") no-repeat: fixed;

.container{
文本对齐:居中;
背景图像:url(“https://s25.postimg.org/exhm9rejz/galaxy-s8_overview_kv_type1.jpg");
背景尺寸:封面;
背景重复:无重复;
背景位置:中心;
宽度:100%;
高度:自动;
保证金:自动;
/**边框:3倍纯色灰色**/
返回
}
/**                     
}
**/
.摩托车{
保证金:自动;
宽度:自动;
边框:1px纯灰*
文本对齐:居中;
}

随机报价机

删除url开头的
。/
background-image: url("../https://s25.postimg.org/exhm9rejz/galaxy-s8_overview_kv_type1.jpg") no-repeat: fixed;
background-image: url("https://s25.postimg.org/exhm9rejz/galaxy-s8_overview_kv_type1.jpg");