在linemanjs中引用供应商文件夹css和js
Reference vendor folder css and js in linemanjs
我正在使用linemanjs
创建一个web应用程序,但是当我明确引用供应商css
和js
文件时,它不会引用该位置。让我知道我在linemanjs上做错了什么。
我在我的文件中尝试的简单的事情是-
link(rel="stylesheet",href="/vendor/css/myvendor.css")
和
link(rel="stylesheet",href="/css/myvendor.css")
和
link(rel="stylesheet",href="css/myvendor.css")
-> myvendor.css
肯定在vendor下的css文件夹中
因为不使用基本HTML的基本标签:
<link rel="stylesheet" type="text/css" href="css/myvendor.css">
如果必须是服务器或客户端,则必须包含标签的路径
如果文件夹vendor包含所有的html文件和文件夹中包含的文件,你使用的网站,我之前在标签中包含的路径是正确的。
如果仍然不包括此文件css,问题是文件不存在或声明错误的文件名或结构css的错误(最好是你发布文件css),但我认为你发现问题与检查元素或Firebug (firefox和[也许]Chrome插件)
UPDATE: Ahhh如果你使用Jade,在you标签中添加'type='text/css'
,因为你最好定义文件的类型。
link(rel='stylesheet', href='css/myvendor.css', type='text/css' )
阅读JADE的文档和
Template inheritance
If you have multiple views with a similar structure, you will end up with the same set of includes in all your views. This approach can quickly become complicated and untidy, if the number of views and includes increases.
使用Jade,您可以生成包含文件css的标签:
!!! 5
html
head
title Learning Inheritance
link(rel='stylesheet', href='/css/myvendor.css')
body
!!!
或者在StavkoverFlow上的其他问题中发布了其他解决方案
head
title test include
| <style type='text/css'>
include css/myvendor.css
| </style>
相关文章:
- css/js:通过滚动固定位置
- 什么CSS/JS技巧驱动镜像反转http://com.google愚人节页面
- CSS/js Flip Cards
- 将回车键映射到HTML/CSS/JS中的按钮
- CSS/.JS问题,<ul><李>在Megamenu中
- 最小化CSS/JS文件,并使用命令行创建一个文件
- 使用公共JS文档优化静态网站的CSS/JS导入
- HTML/CSS/JS切换不同的谷歌日历是同一个框架
- 使用 PHP 将 css/js 文件分配给 html 文档
- HTML/CSS/JS 构建工具
- Knockout.js在标头中绑定css/js库
- 如何在HTML/CSS/JS中为表/列表应用行虚拟化
- 当包含在CSS/JS/HTML中时,我如何得出正确的目录路径
- 这段代码有什么问题(responsible html-css-js)
- CSS/JS:如何在悬停时显示文本,并显示点击href的文本框
- 如何使css/js对象在所有浏览器上都相同
- html+css+js组合在Google Chrome或Safari浏览器中无法正常工作
- CSS/JS转换:translate3d和滚动-在Android上流畅,在iPhone上没有动力
- 使用CSS/JS反转和重新反转元素
- 将复杂的html/css/js元素添加到单个Wordpress页面中