安萍
[CodePen]
Q:CodePen 不同的 view,在 chrome 的 toggle device toolbar 功能中為什麼長得不一樣?

A:
Debugging your CSS in CodePen
因為在 Full Page 模式中,CodePen 在 head 有幫我們設定 viewport,但是在 Debug 模式中沒有幫我們設定。

解決方式:自己設定 viewport,也就是說,在 Stuff for <head> 中貼上下列程式碼
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
載入新的回覆