簡體   English   中英

縮小后,為什么網頁上的文本沒有保留在原位?

[英]Why does the text on my webpage not stay in place when zoomed out?

網絡開發人員 菜鳥在這里! 在Chrome瀏覽器中,當我縮小此頁面時 ,文本會變緊到角落。 但是,當我使用Safari時,它不會發生。 我假設這是CSS問題和/或我將其輸入HTML的方式。 我把它放在這里 jsfiddle上。

.second {
font-family: helvetica neue, arial, sans-serif;
font-size: 30px;
font-weight: lighter;
line-height: 5px;
position: relative;
top: 5px;
width: 500px;
margin-left: -330px;

}

.third {
font-family: helvetica neue, arial, sans-serif;
font-size: 40px;
font-weight: lighter;
line-height: 0px;
position: relative;
top: 5px;
margin-bottom: 70px;
width: 500px;
margin-left: -330px;
}

.fourth {
font-family: helvetica neue, arial, sans-serif;
font-size: 20px;
font-weight: lighter;
line-height: 0px;
position: relative;
top: 30px;
width: 500px;
margin-left: -335px;
background-color: white;


<p class="second"><b>Barter</b> a textbook <b>you have</b></p>
<p class="second">for a textbook <b>you want</b></p>
<p class="second">with a fellow <b>Aggie</b> on campus,</p>
<p class="third"><b><i>now</i></b>.</p> 
margin-left: -330px;

因為您使用的是負邊距,所以它隱藏在屏幕中

而且您的鏈接在我的Chrome中也可以正常工作

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM