背景
今天在github上查閱資料,發(fā)現(xiàn)頁(yè)面的圖片不顯示,原以為是原作者項(xiàng)目里圖片上傳除了問(wèn)題,但后來(lái)發(fā)現(xiàn)所有的項(xiàng)目里圖片都顯示不出來(lái)。
效果演示


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

用記事本打開(kāi)hosts文件(打開(kāi)方式選擇“記事本”),在文件末尾添加:
# 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

問(wèn)題完美解決。