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

14,137 Responses

  1. Diplomi_yupi表示:

    бланки справки дипломы журналы купить 4russkiy365-diplomy.ru .

  2. быстрый анонимный вывод из запоя на дому быстрый анонимный вывод из запоя на дому .

  3. Brianchoky表示:

    http://indianpharmacy.win/# reputable indian pharmacies

  4. LarryHom表示:

    http://mexicanpharmacy.store/# mexican online pharmacies prescription drugs

  5. вывод из запоя на дому краснодар цены вывод из запоя на дому краснодар цены .

  6. EarnestAvada表示:

    Le code promo 1xBet 2025: 1XNEW25, saississez-le lors de votre inscription pour recevoir un bonus jusqu’a $130 sur le sport. Vous pourrez aussi obtenir jusqu’a $1,500 et 150 tours gratuits sur le casino. 1xBet propose jusqu’a $130 de freebets selon le montant de votre premier depot sur les paris sportifs. Parmi eux, le bonus de bienvenue, reserve aux nouveaux inscrits sur la plateforme. Cette plateforme est classee parmi les leaders en Afrique et a travers le monde. Elle vous offre les meilleures options pour vos paris, y compris la diffusion en direct des matchs sans frais supplementaires.
    Utilisez le code promo 1xBet: “1XNEW25” en 2025. Vous pourrez debloquer un bonus de bienvenue jusqu’a $130 sur les paris sportifs. Et n’oubliez pas que 1xBet offre une belle opportunite a tous les nouveaux clients. En utilisant ce code lors de votre inscription, pourrez recuperer jusqu’a $130 sur le sport et jusqu’a $1,500 en freebets et 150 tours gratuits sur le casino en ligne. Pour profiter de ce bonus exceptionnel, il vous suffit d’effectuer votre premier depot. Celui-ci vous donne droit a un bonus de 100% du montant depose, jusqu’a un maximum de $130, ou l’equivalent dans votre devise.

    code promo 1xbet togo

  7. Jamesknowl表示:

    http://canadianpharmacy.win/# reputable canadian online pharmacy

  8. LarryHom表示:

    https://indianpharmacy.win/# best india pharmacy

  9. Brianchoky表示:

    http://canadianpharmacy.win/# best canadian online pharmacy reviews

  10. A small safety checkpoint building at the power was completely destroyed, with large pieces of the building being thrown several hundred yards.

  11. вывод из запоя с выездом краснодар [url=http://vyvod-iz-zapoya-krasnodar114.ru]вывод из запоя с выездом краснодар[/url] .

  12. MiguelBrola表示:

    The most exciting new trains coming in 2025
    промокод золотое яблоко январь 2025 на первый
    Amazing adventures, extraordinary landscapes and fabulous cuisine — the world’s greatest railway journeys are an unforgettable experience that can immerse you in the culture of a new country.

    Demand for luxury “land cruise” trains with five-star hotel-style accommodation is booming. 2025 will see several new trains take to the rails for the first time, offering new opportunities to explore Italy, France, Saudi Arabia and the United Kingdom.

    But the best railway journeys don’t have to be the most expensive. There’s an ever-evolving world of train trips out there. Here are some of the key developments in the coming year
    Two of Europe’s great capitals are now linked by their first direct high-speed train connection. Germany’s Deutsche Bahn introduced a daytime InterCity Express (ICE) service between Paris and Berlin on December 16 and is planning to add a second route between the two capitals in 2026.

    Taking advantage of its new fleet of 200 mph (322 kph) ICE3neo trains, the once-a-day service takes around eight hours in each direction, also serving Strasbourg, Karlsruhe and Frankfurt on its 546-mile (878-kilometer) journey.

    Fares start from around $60, and each train has capacity for 444 passengers, of which 111 can enjoy the additional comfort of leather seats and at-seat refreshments in first class.

    The new high-speed ICE service is the first direct daytime train between Paris and Berlin since the 1990s and complements the Nightjet sleeper service introduced in 2023.

    It may not be as fast as flying — some of the journey has to use lower speed “classic” lines to bridge gaps in the European high-speed network — but it is undoubtedly a more sustainable and more stylish way to travel across Europe.

  13. вывод из запоя с выездом краснодар вывод из запоя с выездом краснодар .

  14. LarryHom表示:

    http://indianpharmacy.win/# indian pharmacy

  15. ClaytonGauct表示:

    mexican border pharmacies shipping to usa: best online pharmacies in mexico – buying prescription drugs in mexico online

  16. Brianchoky表示:

    http://indianpharmacy.win/# india pharmacy mail order

  17. вывод из запоя краснодар на дому анонимно вывод из запоя краснодар на дому анонимно .

  18. вывод из запоя краснодар стационар вывод из запоя краснодар стационар .

  19. Jamesknowl表示:

    https://canadianpharmacy.win/# escrow pharmacy canada

發佈留言

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