首页 > 使用jade模板时css样式问题

使用jade模板时css样式问题

在使用jade的时候遇到一个问题,在 style 中使用标签选择器

doctype html
html(lang='en')
  head
    title= hellojade
    style
      section {
        margin: 20px auto;
        border:1px #eaeaea solid;
        width:80%;
        height:200px; }
      section div {
        margin: 10px; }
  body
    h1 Hello Jade
    section#part1!= part1
    section#part2!= part2

模板引擎解析后css 样式失效,原因是把 section 解析成了html标签而不是标签选择器?、


easy, style -> style., done.

一看就是不好好看文档的。


style.
    div{
        float:left
    }
script.
    var a = 1;
    
【热门文章】
【热门文章】