缩小浏览器窗口大小时,使2张图片停留在背景的固定位置

时间:2019-11-29 09:14:39

标签: html coding-style

即使缩小浏览器窗口,如何使图像保持在同一位置?

下面是我当前的HTML:

<html>
   <head>
      <meta charset="utf-8">
      <title></title>
      <style>
         body {
         height: 100%;
         width: 100%;
         background-image: url('TPHRG floorplan.png');
         background-repeat: no-repeat;
         background-attachment: fixed;
         background-size:  contain;
         }
      </style>
   <body>
      <img id="ZY" style="position:absolute; top:535px; left:770px; border-radius: 50%; width:50px; height:50px" src="zhi yi face.PNG">
      <img id="Nehemiah" style="position:absolute; top:435px; left:570px; border-radius: 50%;  width:50px; height:60px" src="nehemiah face.PNG">
   </body>
</html>

0 个答案:

没有答案
相关问题