程序问答   发布时间:2022-06-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了图像不向上移动,当屏幕尺寸缩小时,图像与包含文本的左侧 div 重叠,向上移动图像是放大背景图像大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

如何解决图像不向上移动,当屏幕尺寸缩小时,图像与包含文本的左侧 div 重叠,向上移动图像是放大背景图像?

开发过程中遇到图像不向上移动,当屏幕尺寸缩小时,图像与包含文本的左侧 div 重叠,向上移动图像是放大背景图像的问题如何解决?下面主要结合日常开发的经验,给出你关于图像不向上移动,当屏幕尺寸缩小时,图像与包含文本的左侧 div 重叠,向上移动图像是放大背景图像的解决方法建议,希望对你解决图像不向上移动,当屏幕尺寸缩小时,图像与包含文本的左侧 div 重叠,向上移动图像是放大背景图像有所启发或帮助;

我无法根据 Aboutus 向上移动图像。如果我使用 top 或 padding-bottom 背景图像会放大我不想要的。如果我减小窗口大小,图像会与左侧的文本重叠。

body,HTML {
  height: 100%;
  wIDth: 100%;
  margin: 0;
  padding: 0px;
  overflow-x: hIDden;
}

#main {
  BACkground-image: url("BACkground2.svg");
  BACkground-repeat: no-repeat;
  BACkground-size: cover;
  margin: auto;
  padding: 0;
}

#top {
  Font-family: Arial,Helvetica,sans-serif;
  Font-style: normal;
  Font-weight: 600;
  Font-size: 112px;
  color: white;
  wIDth: 280px;
  height: 226px;
  padding-left: 10%;
  padding-top: 20%;
}

#logo {
  position: relative;
  bottom: 56%;
  left: -12%;
}

#text {
  color: white;
  Font-family: Arial,sans-serif;
  Font-style: normal;
  Font-weight: normal;
  Font-size: 16px;
  line-height: 22px;
  display: flex;
  align-items: center;
}

#right {
  position: relative;
  left: 50%;
}

.flex-container {
  display: flex;
  flex-direction: column;
}

.flex-item-top {
  flex-direction: row;
}

.flex-item-bottom {
  BACkground-color: #A4D0DB;
}

#dblue {
  BACkground-color: #257B9D;
}
<!DOCTYPE HTML>
<HTML lang="en">

<head>
  <Meta charset="UTF-8">
  <Meta http-equiv="X-UA-Compatible" content="IE=edge">
  <Meta name="vIEwport" content="wIDth=device-wIDth,initial-scale=1.0">
  <link rel="stylesheet" href="aboutus.CSS">
  <title>document</title>
</head>

<body>
  <div class="flex-container">
    <div class="flex-item-top">
      <div ID="main">
        <div ID="top">
          About<br>Us
          <img src="Vector.svg" alt="WaiTing" ID="logo">
          <p ID="text">
            Food Network Agro is a online based food chain shop. We are here to provIDe you all the safe and organic food. The ultimate freshness lIEs in nature. Here we are with our quality products from the Magnificent Sundarban. Get a divine richness and excellence
            at your doorstep
          </p>

        </div>
        <div ID="right">
          <img src="doorstep.svg" alt="WaiTing" ID="door">
        </div>
      </div>
    </div>
    <div class="flex-item-bottom">
      <div ID="dblue">
        <img src="logo1.svg" alt="WaiTing" ID="logo1">
        <img src="logo2.svg" alt="WaiTing" ID="logo2">

      </div>
    </div>
  </div>
</body>

</HTML>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

大佬总结

以上是大佬教程为你收集整理的图像不向上移动,当屏幕尺寸缩小时,图像与包含文本的左侧 div 重叠,向上移动图像是放大背景图像全部内容,希望文章能够帮你解决图像不向上移动,当屏幕尺寸缩小时,图像与包含文本的左侧 div 重叠,向上移动图像是放大背景图像所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。