【问题标题】:How to add css to my page via Git Hub raw?如何通过 Github raw 将 css 添加到我的页面?
【发布时间】:2015-04-07 19:34:02
【问题描述】:

我的 git hub 上有一个 css 文件。我得到一个原始文件的链接 (example) 当我通过链接添加它时,我看到样式未应用于我的元素。在 Firefox 中查看源代码我看到了我的风格的有效链接。

<link rel="stylesheet" type="text/css" href="http://raw.githubusercontent.com/Koi7/github-linker/master/fork-me.css">

【问题讨论】:

  • 很难说——如果你没有写一个链接到你想使用这些样式的页面。

标签: html css github frameworks repository


【解决方案1】:

this thread

根据这是一个开发项目还是一个生产网站,请确保您使用正确的 url。

请参阅this fiddle 了解示例。

    <link rel="stylesheet" type="text/css" href="https://rawgit.com/Koi7/github-linker/master/fork-me.css">

<a class="fork-me-link" href="#"><img src="https://raw.githubusercontent.com/Koi7/github-linker/master/git-hub-link.png" alt=""></a>

【讨论】:

    猜你喜欢
    • 2020-06-08
    • 2011-06-18
    • 2018-03-09
    • 2014-06-13
    • 2022-12-15
    • 2015-11-23
    • 2016-07-05
    • 1970-01-01
    • 2012-04-08
    相关资源
    最近更新 更多