at last, i find it case by that express can not find the local css file.
then i fix in my code.
i use the link word as told, but still can not see the css file invoke successful.
app.js
var
express = require('express')
, cons = require('consolidate')
, jade = require('jade')
, path = require('path')
var app = express()
app.engine('jade', cons.jade)
app.use('/views',express.static(__dirname + '/views'))
app.use("/styles", express.static(__dirname + '/styles'));
app.set('view engine', 'jade')
app.use(function (req, res) {
res.render('layout')
})
app.listen(3000);
/views/layout.jade
html
link(rel='stylesheet', href='../styles/word.css', type='text/css')
head
body
p#para1 Just test css in jade.
/styles/word.css
p
{
text-align:center;
color:red;
}
it seems to be a silly problem, and i post too much code in the question, so thanks for reading at all