Emmet 介紹 – 縮寫篇

縮寫這樣的編輯方式是Emmet的核心功能,可以在輸入簡短的代碼後轉換成結構複雜的HTML,而且使用方式跟使用CSS的選取器雷同,所以非常易於使用。例如:

page>div.logo+ul#navigation>li*5>a{Item $}
------

<div id="page">
    <div class="logo"></div>
    <ul id="navigation">
        <li><a href="">Item 1</a></li>
        <li><a href="">Item 2</a></li>
        <li><a href="">Item 3</a></li>
        <li><a href="">Item 4</a></li>
        <li><a href="">Item 5</a></li>
    </ul>
</div>

以下分別介紹各種不同的縮寫撰寫模式

子結構:>

div>ul>li
------

<div>
    <ul>
        <li></li>
    </ul>
</div>

同層結構:+

div+p+bq
------

<div></div>
<p></p>
<blockquote></blockquote>

上一層:^

div+div>p>span+em^bq
------

<div></div>
<div>
    <p><span></span><em></em></p>
    <blockquote></blockquote>
</div>
div+div>p>span+em^^^bq
------

<div></div>
<div>
    <p><span></span><em></em></p>
</div>
<blockquote></blockquote>

乘法:*

ul>li*5
------

<ul>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
</ul>

分組:( )

div>(header>ul>li*2>a)+footer>p
------

<div>
    <header>
        <ul>
            <li><a href=""></a></li>
            <li><a href=""></a></li>
        </ul>
    </header>
    <footer>
        <p></p>
    </footer>
</div>
(div>dl>(dt+dd)*3)+footer>p
------

<div>
    <dl>
        <dt></dt>
        <dd></dd>
        <dt></dt>
        <dd></dd>
        <dt></dt>
        <dd></dd>
    </dl>
</div>
<footer>
    <p></p>
</footer>

項目編號:$

ul>li.item$*5
------

<ul>
    <li class="item1"></li>
    <li class="item2"></li>
    <li class="item3"></li>
    <li class="item4"></li>
    <li class="item5"></li>
</ul>
ul>li.item$$*5
------

<ul>
    <li class="item001"></li>
    <li class="item002"></li>
    <li class="item003"></li>
    <li class="item004"></li>
    <li class="item005"></li>
</ul>
ul>li.item$@-*5
------

<ul>
    <li class="item5"></li>
    <li class="item4"></li>
    <li class="item3"></li>
    <li class="item2"></li>
    <li class="item1"></li>
</ul>
ul>li.item$@3*5
------

<ul>
    <li class="item3"></li>
    <li class="item4"></li>
    <li class="item5"></li>
    <li class="item6"></li>
    <li class="item7"></li>
</ul>
ul>li.item$@-3*5
------

<ul>
    <li class="item7"></li>
    <li class="item6"></li>
    <li class="item5"></li>
    <li class="item4"></li>
    <li class="item3"></li>
</ul>

內容:{ }

a{Click me}
------

<a href="">Click me</a>
p>{Click }+a{here}+{ to continue}
------

<p>Click <a href="">here</a> to continue</p>

ID and Class

div#header+div.page+div#footer.class1.class2.class3
------

<div id="header"></div>
<div class="page"></div>
<div id="footer" class="class1 class2 class3"></div>

自訂屬性

td[title="Hello world!" colspan=3]
------

<td title="Hello world!" colspan="3"></td>

You may also like...

4,600 Responses

  1. To jest obowiązkowa lektura dla każdego, kto zajmuje się SEO.

  2. Edwarddig表示:

    Pin-up Giris: Pin Up Azerbaycan – ?Onlayn Kazino

  3. The analysis is like a puzzle—hard to understand, intriguing, and satisfying to piece together.

  4. Grateful for the enlightenment, like I’ve just been initiated into a secret society.

  5. Java Burn表示:

    Unquestionably believe that which you stated. Your favorite reason seemed to be on the web the simplest thing to be aware of. I say to you, I certainly get irked while people consider worries that they plainly do not know about. You managed to hit the nail upon the top as well as defined out the whole thing without having side-effects , people can take a signal. Will likely be back to get more. Thanks

  6. RobertSax表示:

    https://autolux-azerbaijan.com/# Pin Up Azerbaycan

  7. Czuję się dużo lepiej poinformowany o SEO. Dzięki!

  8. To było bardzo oświecające. Na pewno skontaktuję się z profesjonalistą od SEO.

  9. O cassino que todos recomendam Blaze

  10. GichardPheve表示:

    This is very interesting, You’re a very skilled blogger. I have joined your feed and look forward to seeking more of your magnificent post. Also, I have shared your website in my social networks!

    americanautotitleloan.com/lake-wylie-sc-title-loans 
    obt.social/blogs/21773/Where-to-buy-a-diploma-at-an-adequate-price 
    itbitgroup.ru/page/4 
    financeokey.ru/page/9 
    aud-ios.com/2017/08/06/ipad-mac-utilize-shared-ethernet-for-ableton-link-internet/ 

  11. itcbet表示:

    I got good info from your blog

  12. Dzięki za jasne i zwięzłe informacje na temat SEO.

  13. A casa dos grandes vencedores Blaze

  14. Edwarddig表示:

    Pin Up Azerbaycan: Pin Up Azerbaycan ?Onlayn Kazino – pin-up kazino

  15. Cieszę się, że znalazłem blog, który tak dokładnie omawia SEO. Dzięki!

  16. Świetne źródło informacji dla każdego, kto ma do czynienia z SEO.

  17. EarnestAvada表示:

    Awesome! Its really awesome paragraph, I have got much clear idea regarding from this paragraph.

    supplementgear.com/low-glycemic-fruits/ 
    hinadezain-test.com/ 
    bn.tobase.ru/viewtopic.php?f=30&t=2717 
    http://www.sskyn.com/home-uid-82653.html 
    artem-energo.ru/forums.php?m=posts&q=17775 

  18. Thank you for adding value to the conversation with The insights.

  19. The insights are like a favorite book; I find new treasures each time I return.

  20. Seu cassino de confianca online Blaze

  21. O cassino que oferece as melhores condicoes Blaze

  22. StephenDeery表示:

    Hi to every , because I am genuinely keen of reading this website’s post to be updated regularly. It contains nice data.

    girbir.com/blogs/13038/Where-can-I-buy-a-diploma-or-certificate-at-a 
    aranzhirovki.ru/smf/index.php?PHPSESSID=j88uttsqnnv6mc97hrus9pfr90&topic=3478.0 
    levit.in.ua/about-us.html 
    http://www.veloxrugby.com/paulsnews.htm 
    ediblehomegardensresorts.com/index.php?do=/public/user/blogs/name_Alanpoe/page_7/ 

  23. As melhores slots estao aqui Blaze

  24. Jogue no cassino de maior prestigio Blaze

  25. Seu destino para grandes premios Blaze

  26. To jest obowiązkowa lektura dla każdego, kto zajmuje się SEO.

  27. Lewisslund表示:

    Amazing! Its genuinely amazing post, I have got much clear idea on the topic of from this post.

    dsgolfcenters.com/crossings/form.html 
    darknews.ru/page/34 
    forum.l2star.net/member.php?u=17186 
    http://www.andorracf.com/datosprimerequipo.php?ids=Plantilla 
    51.15.223.140/forum/member.php?tab=visitor_messaging&u=76509&page=6 

  28. Descubra o melhor casino Blaze

  29. That’s why so many science fiction stories use Greek and Roman names, stories and history.

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。