문제

I've been searching in the examples on the GitHub but I couldn't find how to load a simple css file into my layout. My first thought was doing something like this link(href="my.css") but it seems it's not working at all. The href points to a correct location online (checked and working) thus maybe I'm forgetting something?

도움이 되었습니까?

해결책

try: link(rel='stylesheet', href='/stylesheets/style.css')

다른 팁

I think you need to include the relationship. Try

link(rel='stylesheet', href='my.css')

You need to add the type:

link(rel='stylesheet', href='my.css', type='text/css' )

This works:

html
    head
        style
             include ./style.css
    body

if you're using Jade with connect-assets, you can just use:

!= css('stylesheetName')

where stylesheetName.css is in your assets/css/ directory.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top