简体   繁体   English

使用外部 CSS 的 Blogger 条件标签

[英]Blogger Conditional Tag using external CSS

On my Blogger page there are 2 layouts - one for Home page and one for Single Item, and they are working fine.在我的 Blogger 页面上有 2 种布局 - 一种用于主页,一种用于单项,它们运行良好。 However, now I want to use remote css , without local XML file being used for everything.但是,现在我想使用远程 css ,而无需将本地 XML 文件用于所有内容。

But it doesn't seem to be possible.但这似乎不可能。 The error I get is : A skin cannot contain the element: link.我得到的错误是:皮肤不能包含元素:链接。 Only text and CDATA sections are accepted Any ideas how to go about this?只接受文本和 CDATA 部分 任何想法如何去做?

<b:skin>
  <style>
   <link rel="stylesheet" href="https://user.github.io/folder/css/style_home.css" type="text/css"/>
  </style>
</b:skin>

<b:if cond='data:view.isSingleItem'>
  <style>
   <link rel="stylesheet" href="https://user.github.io/folder/css/style_blog.css" type="text/css"/>
  </style>
</b:if>
<b:skin></b:skin>
<b:if cond='data:view.isHomepage'>
   <link rel="stylesheet" href="https://user.github.io/folder/css/style_home.css" type="text/css"/>
<b:elseif cond='data:view.isSingleItem'/>
   <link rel="stylesheet" href="https://user.github.io/folder/css/style_blog.css" type="text/css"/>
</b:if>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM