html - 为什么在我的 html 头标签中添加 google 字体链接后我的网页会抖动?
问题描述
我在 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>
解决方案
感谢您的回答。我刚刚使用一种方法解决了我的问题。当我使用 vs 代码时。我设置了一个自动保存选项。自动保存延迟选项设置为 100 毫秒。当我将其转换为 1000 毫秒时,它可以在不晃动页面的情况下工作。
推荐阅读
- c++ - 读取文件c ++时如何跳过空格
- java - 在移动到下一个之前,如何完全运行 if 语句?
- elasticsearch - elasticSearch 从一个对象的两个索引中获取数据
- java - 我如何打印出这个流?
- c# - c# 传递一个 CancellationToken 好吗?
- vba - 在PowerPoint VBA中获取形状索引
- ios - 如何在 iOS 上捕捉全景视频?
- javascript - 扩展后端计算以支持 n 个记录数组,每个记录有 3 个要求和的值
- c++ - start_info.lpDesktop 是 LPWSTR 实体,但它说这是 const wchat_t*?
- python - Python 程序从文件夹或桌面打开时无法正常运行,但在 IDLE 中运行时可以正常运行