简体   繁体   English

Emmet-我可以写HTML以便CSS结构自动生成吗?

[英]Emmet - Can I write html so that the css structure will generate automatically?

I have one question. 我有一个问题。 I use Emmet to write html. 我使用Emmet编写html。 Can I write html so that the css structure will generate automatically? 我可以编写html以便CSS结构自动生成吗? For example... I write this code: 例如...我写这段​​代码:

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

I will get this: 我会得到这个:

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

I would like this result: 我想要这个结果:

<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>

Is it possible? 可能吗?

Have you checked out primercss. 你检查底漆吗? I think this is what you are asking for. 我想这就是您要的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM