LoginSignup
0
0

More than 1 year has passed since last update.

Rails Bootstrap導入による必要事項

Posted at

head要素内でmeta name="viewport"...を使用する理由

デバイスごとにサイズを調整するのに記述が必要。

application.html.erb
meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

【解説】

content="width=device-width

横幅をデバイスの幅に合わせるという意味です。

initial-scale=1

倍率を指定するもの

maximum-scale=1

最大倍率を示す

レスポンシブの対応を行うために必要のため記述を行う。

参考:https://www.tagindex.com/html5/page/meta_viewport.html

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