简体   繁体   English

字体粗细不适用于任何浏览器

[英]Font-weight is not working with any browser

My HTML file is :- 我的HTML文件是:-

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Kitty Portfolio</title>
    <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">
  </head>
  <body>
    <div class="container">
      <div class="row">
        <div class="col-md-6">
            <img src="http://placehold.it/100x100" class="img-responsive" alt="Logo">
        </div>
        <div class="col-md-6 text-uppercase text-right">
          <h1 class="super-text">Jane Doette</h1>
          <h3>Front-end Ninja</h3>
        </div>
      </div>
      <div class="row">
        <div class="col-md-12">
          <hr>
        </div>
      </div>
      <div class="row">
        <div class="col-md-12">
          <img src="http://placehold.it/1140x350" class="img-responsive">
        </div>
      </div>
      <div class="row">
        <div class="col-md-12">
          <h2>Featured Work</h2>
        </div>
      </div>
      <div class="row text-center">
        <div class="col-md-4">
          <img src="http://placehold.it/555x300" class="img-responsive">
          <h3>Appify</h3>
          <p><a href="http://github.com">Link to project</a></p>
        </div>
        <div class="col-md-4">
          <img src="http://placehold.it/555x300" class="img-responsive">
          <h3>Sunflower</h3>
          <p><a href="http://github.com">Link to project</a></p>
        </div>
        <div class="col-md-4">
          <img src="http://placehold.it/555x300" class="img-responsive">
          <h3>Bokeh</h3>
          <p><a href="http://github.com">Link to project</a></p>
        </div>
      </div>
    </div>
   </body>
  </html>

And my css file is :- 我的css文件是:-

.super-text {
    font-size: 60px;
    font-weight: 200;
}


body {
    font-family: 'Lato', sans-serif;
    color: #747704;
    font-weight: 100;
}

Now, When I open the html file in a browser. 现在,当我在浏览器中打开html文件时。 The font style and color makes it but the font-weight is nor affecting the any text on the screen. 字体样式和颜色使之成为可能,但字体粗细也不影响屏幕上的任何文本。 I tried mozilla firefox, chrome and internet explorer and none of these browsers do any good. 我尝试使用mozilla firefox,chrome和Internet Explorer,但这些浏览器都无法发挥任何作用。 Does anyone know where my problem might be lying. 有谁知道我的问题可能在哪里。

将CSS中的font-eight更改为700px

i didn't encounter any problem with none of these 3 browsers but i got better results with 这3个浏览器都没有遇到任何问题,但是我得到了更好的结果

font-size: 60pt; 

instead of using px in css file for size. 而不是在css文件中使用px作为大小。

For font-weight don't use numbers, valid values are ; 对于字体粗细不要使用数字,有效值为;
normal|lighter|bold|bolder|value|initial| inherit

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM