为什么此png图像出现两次?

卢卡斯·贝纳莱斯(Lucas Bernales)

嗨,我对这个png图像有问题,我正在尝试将其放置在屏幕中间以调整其大小,但它一直在向其中显示图像网的一部分,我c(是我的第一个网页,接受任何更正)检查代码,我只链接了一张图片。你能帮我吗?

它应该看起来像这样

它应该看起来像这样

但是png出现了两倍

但是png出现了两倍

html

<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">


<link rel="stylesheet" type="text/css" href="ehands.css">


</head>


    <body>


        <div>
<h1>Ehandcipation</h1>
</div>
<div>
 <img src = "logoehands.png"
          />
 </div>
        <video autoplay muted loop id="myVideo">
  <source src="rain.mp4" type="video/mp4">
  Your browser does not support HTML5 video.
</video> 
</body>
</html>

的CSS

#myVideo {
  position: fixed;
  right: 0;
  bottom: 0;
  min-width: 100%; 
  min-height: 100%;
  z-index: -1000;
  overflow: hidden
}    

body{
    text-align: : center;

}


div{background-color:rgba(0,0,0,0.65);

    position: fixed;
    right: 0;
    bottom: 0;
    width: 400px; 
    height: 400px;
    top: 25%;
    left: 37%;
      margin-left: px; 
    margin-top: -25px; 

}

h1 { 
 color:#fff;
text-align:center;  
    position: abosulte;

}
img {
  width: 100%;
  height: 400px;
  background-image: url('logoehands.png');


}
杰罗姆·W

您需要删除以下选项之一:

  • html: src = "logoehands.png"
  • css: background-image: url('logoehands.png');

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章