2017-09-07 68 views
-1

我正嘗試在我的網站中使用來自Google字體的Lato。我對fonts.google.com看到,拉託具有鮮明的字體粗細,和他們明顯的差異:谷歌字體,拉託,字體重量不像預期的那樣顯示

https://fonts.google.com/specimen/Lato

在實踐中,我沒有看到太多這類之間的區別,這對複雜設計的我現場。

任何人都可以告訴我,如果我正確使用拉託和字體的權重,或告訴我如何使用字體的權重?

https://plnkr.co/Ng6Xk9S3TqGA2xzl7Nne

<head> 
    <link rel="stylesheet" href="style.css"> 
    <script src="script.js"></script> 
    <link href="https://fonts.googleapis.com/css?family=Lato|Open+Sans:500,600,700,800" rel="stylesheet"> 
</head> 

<style> 
    body { 
    font-family: 'Lato', sans-serif 
    } 
</style> 

<body> 
    <div style="font-weight:500">This is a test!</div> 
    <div style="font-weight:600">This is a test!</div> 
    <div style="font-weight:700">This is a test!</div> 
    <div style="font-weight:800">This is a test!</div> 
</body> 
+2

你只是在其中包括定期拉託。你包括Open Sans的多個權重*,而不是Lato *。 – Li357

回答

0

感謝李國能,我意識到我包括字體權重開放三世,不拉託。這裏有一個固定的Plunkr:

https://plnkr.co/edit/9mKXYie2BdMvkf3uuvgn

此修復程序是:

<link href="https://fonts.googleapis.com/css?family=Lato:400,700,900" rel="stylesheet">