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

11,733 Responses

  1. Merolapisn表示:

    college application essay writers
    college admissions essay help
    help me essays

  2. Martypisn表示:

    help write essay for me
    essay writing website
    essay assignment help

  3. Kategoriler Türk. Ilgili filmler: Uyuyan kardeş anal.
    Sırala. popülerliğe göre eklendiği tarihine göre.
    03:24. zorluk-derecesi uyuma hint sikişme kız-kardeş.

    XHamster. 40:22. yaşlı anal uyuma 18-yaşındaki britanyalı aamerikalı kız-kardeş
    daha-yaşl.

  4. MABAKAWLBIXug表示:

    buy kamagra 50mg without prescription kamagra 50mg cost generic kamagra 100 mg

  5. Martypisn表示:

    buy essay paper
    the help essay on racism
    write my essay please

  6. Dorolisapisn表示:

    best essay help
    buy essays online cheap
    essay writing help for high school students

  7. XsaAyklLiZgt表示:

    On this site u can buy all known nft monkey for very good price!

  8. Dorolisapisn表示:

    what is a good essay writing service
    help write my essay
    help with writing an essay

  9. Marrispisn表示:

    please write my essay
    buy essay cheap
    live essay help

  10. PABAKAWLBIXgp表示:

    pregabalin 150mg price lyrica 75 mg without prescription buy pregabalin 75 mg generic

  11. PABAKAWLBIXpm表示:

    order lyrica 150mg online lyrica 150mg drug buy pregabalin 75 mg pills

  12. Marrispisn表示:

    application essay help
    national honor society essay help
    best writing service

  13. Marrispisn表示:

    help with essay writing
    essay writing service cheap
    best essay writers online

  14. Joetepisn表示:

    flirtbee
    meet women free
    date free site

  15. engelsWet表示:

    Imatinib is an oral TKI that inhibits BCR- ABL, PDGFR and c- kit. cheap doxycycline 180 100 mg without rx

  16. ZABAKAWLBIXil表示:

    cost of ivermectin 3mg tablets ivermectin 4000 purchase oral ivermectin

  17. engelsWet表示:

    tetracycline vs doxycycline For prevention of pneumonia and diarrhea for people with HIV, take two 480 mg tablets every day.

  18. engelsWet表示:

    PubMed 22494697. doxycycline 100mg twice a day Common Pediatric Overdoses.

  19. wewencash表示:

    doxycycline vet canada Roe DA, Bogusz S, Sheu J, et al.

  20. engelsWet表示:

    Zhang HW, Li W, Yan QY, He LJ, Su YP Impact of blastocystis hominis infection on ultrastructure of intestinal mucosa in mice. how much doxycycline should i take for sinus infection Spirochaetes which can cause syphilis and Lyme disease and the bacteria that cause acne, anthrax, and cholera are other susceptible microorganisms.

  21. Eachellepisn表示:

    free single date
    single women local
    fdating

  22. Looking at your post, my post on a similar topic seems shabby. So, I think your article has a lot of things to refer to. Could you please read my post later and leave your comments? 먹튀검증업체

  23. I really thank you for the valuable info on this great subject and look forward to more great posts. Thanks a lot for enjoying this beauty article with me. I am appreciating it very much! Looking forward to another great article. Good luck to the author! All the best! 스포츠토토사이트

  24. You have made some decent points there. I looked on the internet for more information about the issue and found most people will go along with your views on this web site 먹튀사이트

  25. NABAKAWLBIXfm表示:

    ivermectin eye drops stromectol cream stromectol 3 mg tablet

  1. 2022-09-19

    1dissimilarity

發佈留言

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