html - 在所有平台上将文本位置设置为永久
问题描述
我不知道它是否可能,但可以说我在 HTML 中有一个段落并且它已调整到我的屏幕,但是当我在另一台计算机上打开我的文件时,文本会从屏幕上消失。有没有办法将位置设置为所有计算机上的永久位置?
HTML 示例:
<strong1 style="top: 180px; left: 40px;">I can't believe i actually did this, wow i really need to find</strong1>
<strong1 style="top: 180px; left: 523px;">what to do in my life</strong1>
解决方案
使用百分比允许您根据屏幕大小动态定位元素。
<strong1 style="margin-top: 20%; margin-left: 10%;">Some text</strong1>