Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/41.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 图像在主体属性中渲染_Html_Css - Fatal编程技术网

Html 图像在主体属性中渲染

Html 图像在主体属性中渲染,html,css,Html,Css,我正在使用一个带有HTML正文的页面,以及一些与head部分中定义的正文相关联的属性。执行页面时,图像有时呈现,有时不呈现 <head> <style type="text/css"> body { background-image: url('Assets/Img/bg2.jpg'); background-size: cover; /* <------ */ background-repeat: no-repeat

我正在使用一个带有HTML正文的页面,以及一些与head部分中定义的正文相关联的属性。执行页面时,图像有时呈现,有时不呈现

<head>
  <style type="text/css">
    body {
      background-image: url('Assets/Img/bg2.jpg');
      background-size: cover; /* <------ */
      background-repeat: no-repeat;
      background-position: center center; /* optional, center the image */
    }
  </style>
</head>

身体{
背景图片:url('Assets/Img/bg2.jpg');

背景尺寸:cover;/*你能看看开发工具中的“网络”选项卡吗?我能看到的唯一问题是图像加载失败。@Phillip你所说的“网络”选项卡打开你的开发工具。在Firefox上,我按cmd+alt+I。应该有一个名为“网络”的选项卡。我知道Chrome也有这个选项卡。Chrome中的Ctrl+Shift+Id F12在IET中这可能只是连接问题,尝试在单独的窗口中打开图像url,看看它是否总是加载。您看到的错误代码和消息是什么?
<body class="signup-page">
    <div id="content"></div>
</body>