Google字体,sans-serif机器人不起作用

问题描述 投票:0回答:1

尽管我放了超赞字体和Google字体的链接,但网站上的字体没有改变。我不知道如何解决。有谁知道是什么原因导致这个问题?

contact.php

 <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
 <head>
    <title>American Website Design &amp; Development Agency - JOEY NAMIKI DESIGN</title>
    <link rel="stylesheet" type="text/css" href="css/reset.css">
    <link rel="stylesheet" type="text/css" href="css/contact.css">
    <link rel="stylesheet" href="css/font-awesome.min.css">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.css">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick-theme.min.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="https://fonts.googleapis.com/css?family=PT+Sans&display=swap" rel="stylesheet">
 <link href="https://fonts.googleapis.com/css?family=Roboto&display=swap" rel="stylesheet"> 
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
 </head>
<body>
<section class="contactSection">
                <h1>Please tell me what kind of design you want to get?</h1>
                <div class="contactForm">
                     <div class="tweet">
                      <h1>We listen all clients</h1>
                      <p>If you have any concerns regards to web, marketing, branding, design and redesign, feel free to ask me. I will give you the estimation.</p>
                      </div>
                      <form method="post" action="send.php"  id="content">
                            <div>*Name<input type="text" name="name" required></div>
                            <div>Company Name<input type="text" name="company"></div>
                            <div>*Phone Number<input type="text" name="phone"  required></div>
                            <div>*Email<input type="text" name="email"  required></div>
                          <div>*Message<textarea type="text" name="message" ></textarea></div>
                        <div><input type="submit" class="send"   value="submit"></div>
                      </form>
                </div>
          </section>
</body>
</html>

contact.css

@media only screen and (max-width: 2592px) {
html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    background: black;
    overflow-x: hidden;
    color: cornsilk;
    font-family: 'Roboto', sans-serif, 'PT Sans'sans-serif, Helvetica sans-serif;
    font-size: 16px;
    line-height: 160%;
}
button {
    text-transform: uppercase;
    font-weight: bold;
}
a {
    font-size: 18px;
    text-decoration: none;
}
h1 {
    font-size: 42px;
    font-weight: bold;
    line-height: 120%;
    font-family: 'Roboto', sans-serif, 'PT Sans'sans-serif, Helvetica sans-serif;
}
p {
  font-size: 17px;
  line-height: 1.4;
}
}
html css font-family google-fonts
1个回答
1
投票

尝试一下

font-family: 'Roboto', 'PT Sans', 'Helvetica', sans-serif;

该行指出,将优先级赋予Roboto,如果未找到该字体,将采用PT Sans。第三优先事项是Helvetica。

出于任何原因,如果这些字体无法加载,我们将sans-serif设置为最后优先级,则将应用所有受支持的Sans-serif(Ariel或任何其他)字体。

© www.soinside.com 2019 - 2024. All rights reserved.