Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/70.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,当窗口调整大小时,我试图让我的文本落在图像下,我对编码是新手,这是我第一次尝试编码,所以不要判断lol。 code您有很多负边距和绝对位置。试试这个CSS #p { overflow: hidden; margin-right: 25px; font-weight: 200; font-size: 14px; color: #757575; transform: translateX(-0.5%); } 如果您需要仅在特定屏幕大小上执行此操作,请查看媒体查询。 如果您想

当窗口调整大小时,我试图让我的文本落在图像下,我对编码是新手,这是我第一次尝试编码,所以不要判断lol。
code

您有很多负边距和绝对位置。试试这个CSS

#p {
  overflow: hidden;
  margin-right: 25px;
  font-weight: 200;
  font-size: 14px;
  color: #757575;
  transform: translateX(-0.5%);
}
如果您需要仅在特定屏幕大小上执行此操作,请查看媒体查询。

如果您想在不同的设备/屏幕大小上以不同的方式显示页面中的元素,则应在CSS中检查

样本:

@media (max-width: 12450px) { your style here.. }

您可以使用媒体查询使您的网页响应:

@media only screen and (min-width : 320px) and (max-width : 720px) {
  #p {
    position: relative;
    bottom: 500%;
    overflow: hidden;
    margin-left: 15%;
    margin-top: 50px;
    margin-right: 25px;
    font-weight: 200;
    font-size: 14px;
    color: #757575;
    transform:translateX(-0.5%);
  }
}

检查这里:

嘿,顶部是当页面完全展开时的外观,我试图缩小照片,并在标题和段落上方。请在问题本身中包含所有相关代码,最好是作为标题。如果我们不必离开网站去查找您的代码,我们将更容易帮助您。