Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
内联CSS无法使用jade_Css_Pug - Fatal编程技术网

内联CSS无法使用jade

内联CSS无法使用jade,css,pug,Css,Pug,我正在尝试优化CSS交付,正如google页面中推荐的: 然而,我甚至不能用翡翠重现他们的基本例子。以下代码不起作用: html head title= title meta(name='viewport' content='width=device-width, initial-scale=1.0') style(type='text/css') .blue{color:blue}; body nav(class='navbar nav

我正在尝试优化CSS交付,正如google页面中推荐的:

然而,我甚至不能用翡翠重现他们的基本例子。以下代码不起作用:

html
  head
    title= title
    meta(name='viewport' content='width=device-width, initial-scale=1.0')
    style(type='text/css')
        .blue{color:blue};
  body
    nav(class='navbar navbar-default navbar-fixed-top')
    p(class='blue') test

p标记没有拾取我指定给的样式。样式标记中的蓝色。这种类型的内联CSS是否可以与Jade一起使用?

您是否尝试过使用!重要吗

html
  head
    title= title
    meta(name='viewport' content='width=device-width, initial-scale=1.0')
    style(type='text/css')
         .blue{color:blue !important};
 body
   nav(class='navbar navbar-default navbar-fixed-top')
    p(class='blue') test

不能缩进样式。这项工作:

html
   head
   title= title
   meta(name='viewport' content='width=device-width, initial-scale=1.0')
   style(type='text/css').blue{color:blue};
 body
   nav(class='navbar navbar-default navbar-fixed-top')
   p(class='blue') test

我有,但它不起作用。blue类没有拾取任何内容,这意味着没有任何样式可归因于它。