2017-08-08 76 views
0

无论屏幕大小如何,我都希望我的文本保持所有格式,但如果要使屏幕足够小,它将更改其格式以适合屏幕。如何让文字无法响应?

我该如何使它保持原来的位置和格式。

<div style="background-color: white; height: 600px; padding: 100px 200px;"> 
 

 
    <br><br><br> 
 

 
    <h1 style="font-size: 70px;color:#21ce99;">about me</h1> 
 

 
    <p style="font-size: 20px;color: #0ec998">I'm a Developer and aspiring Entrepreneur <br>from Voorhees, New Jersey in the US.</p> 
 
    <p style="font-size: 16px;color: #0ec998">As a young developer, I strive to make complex <br>problems, simple. Combined with my passion <br>for entrepreneurship, I hope to create something<br>that can beneficially impact the world.</p> 
 
</div>

回答

0

你可以尝试使用最小宽度和最小高度属性在你的风格标签给他们的最小宽度和高度。确保不要使用诸如vh,em之类的相对度量单位,或者使用像素来完全忽略屏幕大小。您应该将这些属性放在围绕文本的div上。

0

简单地指定您不想包装CSS'空白属性的文本。

0

空白属性指定一个元素内的空白如何被处理。

空格的序列将收缩为单个空格。文本将永远不会换行到下一行。文本继续在同一行,直到遇到<>标记。

现在更多的,你可以参考文本属性:W3school White-space

p{ 
 
    white-space: nowrap; 
 
}
<p>Your desired textYour desired textYour desired textYour desired textYour desired textYour desired textYour desired textYour desired text</p>