html - 我怎样才能像桌面一样移动?

标签 html css division

我创建了一个 div,用于在图像上放置文本。

这里是代码:

<div style="text-align:center;position:absolute;height:36.75%;width:25%;top:9.25%;left:9.75%;background-color:red">
<br/>
<h3 style="font-size:100%;font-family:RightChalk;color:white">Helloo</h3>
<h4 style="font-size:75%;font-family:RightChalk;color:white">Text right here</h4>
<h5 style="font-size:85%;font-family:RightChalk;;color:white;text-align:left;margin-left:15%">Yes, i want<br/>No, i don't</h5>
<h5 style="font-size:70%;font-family:RightChalk;color:white">MANUAL HISTORY<br/>PRINCIPAL Story</h5>
</div>

这里是手机: On mobile is perfect 太完美了。

这里是桌面: Not perfect 它不像在移动设备上那样填满正方形。

我该如何解决? 谢谢!

最佳答案

在您的浏览器上预览时按 ctrl/command shift strong textM,然后它将显示它在您的手机上的显示方式。 希望我好好回答你。

关于html - 我怎样才能像桌面一样移动?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50982945/

相关文章:

html - 放大时如何防止导航栏将元素移动到下一行?

html - 如何镜像 <video> HTML5

google-chrome - 当父项具有边框半径且子项具有动画时,隐藏的 CSS 溢出在 chrome 中不起作用

c - C 中的除法返回 0... 有时

java - jQuery UI 选项卡中未捕获的异常 : Mismatching fragment identifier

javascript - 为什么当我点击它时隐藏的容器没有重新出现?

css - CSS block 中的未闭合引号

css - 我在哪里可以在 shopify 中编辑 CSS 文件

c# - 如何解决试图在 C# 中除以零?

linux - NASM 除法使用变量而不是实际值