# 前端隨手記 ## viewport的設定 ``` <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> ``` 1. viewport:視窗,也就是網頁範圍 2. content="width=device-width":寬度與顯示裝置的寬度一樣(適應各種看網頁的裝置,電腦、手機、平板等等) 3. initial-scale:一開始是否要放大或縮小,1代表不變(100%),應該是「原本大小x1」的意思。可以寫1以上的數字來幫自己的網頁放大,看起來的效果就像是老人家手機字體放大的樣子,響應式效果大打折扣且會出現該死的埢軸。 ## meta標籤妙用 ``` <meta name = "robot" content="index, follow"> ``` 讓搜尋引擎更容易找到你的網站,「robot、index、follow」有讓網站更容易被搜尋到的意思。 ``` <meta name = "description" content = "你對這個網站的描述、簡介之類的"> ``` 「description」是「描述」的意思,content要加入對這個網站的描述。 ``` <meta name = "author" content = "網站作者"> ``` 顧名思義,就是在說這個網頁是誰寫的,幫自己打廣告。 ## anchor tag 「anchor」是「錨」的意思。
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up