【问题标题】:Emmet - Can I write html so that the css structure will generate automatically?Emmet - 我可以编写 html 以便自动生成 css 结构吗?
【发布时间】:2014-08-17 07:34:26
【问题描述】:

我有一个问题。 我使用 Emmet 编写 html。 我可以编写html以便自动生成css结构吗? 比如……我写了这段代码:

div.wrapper>div.head>a.logo+h1{Some text}

我会得到这个:

<div class="wrapper">
 <div class="head">
  <a href="" class="logo"></a>
  <h1>Some text</h1>
 </div>
</div>

我想要这个结果:

<div class="wrapper">
 <div class="head">
  <a href="" class="logo"></a>
  <h1>Some text</h1>
 </div>
</div>
<style>
   .wrapper {}
   .wrapper .head {}
   .wrapper .head a.logo {}
   .wrapper .head a:hover.logo {}
   .wrapper .head h1 {}
</style>

有可能吗?

【问题讨论】:

  • “自动生成css结构”是什么意思?
  • 我更正了我的问题。我希望你能明白我的意思
  • 使用 Emmet - 答案是否定的。

标签: html css emmet


【解决方案1】:

你检查过primercss.我想这就是你想要的。

【讨论】:

  • 是的!正是我想要的。谢谢!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-04-16
  • 1970-01-01
  • 2014-03-07
  • 1970-01-01
  • 1970-01-01
  • 2021-05-30
相关资源
最近更新 更多