背景
今天在github上查閱資料,發現頁面的圖片不顯示,原以為是原作者項目里圖片上傳除了問題,但后來發現所有的項目里圖片都顯示不出來。
效果演示


解決方法
修改本地的hosts文件
打開路徑 C:\Windows\System32\drivers\etc\hosts(windows10系統可能為C:\Windows\System32\drivers\etc\HOSTS)

用記事本打開hosts文件(打開方式選擇“記事本”),在文件末尾添加:
# GitHub Start
192.30.253.112 Build software better, together
192.30.253.119 gist.github.com
151.101.184.133 assets-cdn.github.com
151.101.184.133 raw.githubusercontent.com
151.101.184.133 gist.githubusercontent.com
151.101.184.133 cloud.githubusercontent.com
151.101.184.133 camo.githubusercontent.com
151.101.184.133 avatars0.githubusercontent.com
151.101.184.133 avatars1.githubusercontent.com
151.101.184.133 avatars2.githubusercontent.com
151.101.184.133 avatars3.githubusercontent.com
151.101.184.133 avatars4.githubusercontent.com
151.101.184.133 avatars5.githubusercontent.com
151.101.184.133 avatars6.githubusercontent.com
151.101.184.133 avatars7.githubusercontent.com
151.101.184.133 avatars8.githubusercontent.com
# GitHub End

問題完美解決。
