【发布时间】: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 - 答案是否定的。