Referencing a .css file in github repo as stylesheet in a .html file

前端 未结 5 750
感情败类
感情败类 2020-12-01 06:17

I\'ve got a repository on github with a .css file in it. Is there any way to have github serve this file in a way that I can consume it in a web page?

In other words

5条回答
  •  余生分开走
    2020-12-01 06:57

    Important: rawgit.com is shutting down. Read more about other alternatives here - https://rawgit.com/


    Found something really cool. You get the raw link as: http://raw.github.com/...

    Simply fetch the files from rawgit.com (or cdn.rawgit.com) instead of raw.github.com and DONE!


    UPDATE:

    You can also use raw.githack.com if you want to serves raw files directly from Bitbucket or GitLab

提交回复
热议问题