LoginSignup
0
0

More than 3 years have passed since last update.

【Vue.js】Google Fontsの使い方

Last updated at Posted at 2021-04-10

まずは公式ページでフォントを選ぶ

公式サイト:Google Fonts

フォントが決まったら[+ select this style]を押下

Use on the web」という箇所があるので、そこでimportを選択。

importが選択できたら下記コードをコピー

<style>
@import url('https://fonts.googleapis.com/css2?family=(選択されたフォント)&display=swap');
</style>
font-family: (選択されたフォント);

styleタグ内にペースト

これをコピーしてstyleタグ内に貼り付けます。

scss
<style scoped lang="scss">
@import url("https://fonts.googleapis.com/css2?family=(選択されたフォント)&display=swap");

.ttl {
    font-family: (選択されたフォント);
</style>

たったこれだけでGoogle Fontsが使えるようになりました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0