首页 > 解决方案 > 我怎样才能像桌面一样显示移动设备?

问题描述

我创建了一个 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>

在这里移动: 在手机上是完美的 它是完美的。

此处桌面: 不完美 它不像移动设备那样填充正方形。

我该如何解决?谢谢!

标签: htmlcssdivision

解决方案


在浏览器上预览时按 crtl/comand shift strong text M,然后它将显示它在您的手机上的显示方式。希望我能很好地回答你。


推荐阅读