亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

為什么在我的 html head 標簽中添加 google font 鏈接后我的網頁會抖動?

為什么在我的 html head 標簽中添加 google font 鏈接后我的網頁會抖動?

HUWWW 2024-01-11 10:37:07
我在Vs代碼中創建了一個網頁。然后我從google-font中選擇一種字體并將其鏈接嵌入HTML 的 head 標簽中。然后在 CSS 中添加字體系列。它工作正常。當我在實時服務器擴展中測試網頁時。我注意到每當我在 CSS 中寫一個字符時,頁面 就會晃動很大。當我停止編寫代碼時,震動就會停止。在搖動過程中,字體無緣無故地變得更大、更小、更暗等,盡管我沒有對字體做任何事情。這背后的問題是什么?如何停止這種晃動?body{font-family: 'Girassol', cursive;font-size:25px;}<!DOCTYPE html><html>  <head>    <title>Dropdown Menu design</title>    <link      href="https://fonts.googleapis.com/css2?family=Girassol&display=swap"      rel="stylesheet"    />    <link rel="stylesheet" href="indexstyle.css" />    <script src="try.js"></script>  </head>  <body>    <p>      The University was established as compensation for the annulment of the      1905 Partition of Bengal. The partition had established East Bengal and      Assam as a separate province, with Dhaka as its capital. However, the      partition was abolished in 1911. In 1913, public opinion was solicited      before the university scheme was given its final shape, and the Secretary      of State approved it in December 1913.[1] The first vice-chancellor of the      university was Philip Joseph Hartog, who had been academic registrar of      the University of London for 17 years.[    </p>  </body></html>
查看完整描述

2 回答

?
拉風的咖菲貓

TA貢獻1995條經驗 獲得超2個贊

感謝您的回答。我剛剛用一種方法解決了我的問題。因為我正在使用 VS Code。我設置了自動保存選項。自動保存延遲選項設置為 100 毫秒。當我將其轉換為 1000 毫秒時,它可以正常工作,并且頁面不會晃動。



查看完整回答
反對 回復 2024-01-11
?
Qyouu

TA貢獻1786條經驗 獲得超11個贊

這可能是因為當您鍵入 CSS 時,它會暫時無效,直到您完成正在鍵入的規則。由于您使用的是實時預覽擴展程序,而 CSS 無效,因此不會應用規則,因此您將看到頁面外觀的更改。



查看完整回答
反對 回復 2024-01-11
  • 2 回答
  • 0 關注
  • 153 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號