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

22,152 Responses

  1. 789club tài xỉu ensures smooth gameplay, secure transactions, and exciting rewards for all players. Play exciting games, earn big rewards, and experience fast-paced action. Don’t miss out – join 789club tài xỉu now for the best gaming fun!

  2. WilliamNop表示:

    kamagra jelly kopen: kamagra 100mg kopen – kamagra pillen kopen

  3. TerryDus表示:

    http://tadalafileasybuy.com/# cialis without a doctor prescription

  4. WilliamNop表示:

    Generic Cialis price: Cialis 20mg price – Cialis 20mg price in USA

  5. TerryDus表示:

    https://tadalafileasybuy.com/# Generic Cialis without a doctor prescription

  6. Putman, Yolanda (March 24, 2013).

  7. The principle difference is that the oil must be stored in a tank that can be over or underneath floor and fresh provides delivered.

  8. Bandwidth restriction: Users of forex mirror trading platforms are typically not given the chance to place trades on the underlying asset.

  9. Предлагаем услуги профессиональных инженеров офицальной мастерской.
    Еслли вы искали срочный ремонт приставок xbox, можете посмотреть на сайте: срочный ремонт приставок xbox
    Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!

  10. Williszew表示:

    https://interpharmonline.shop/# certified canadian pharmacy

  11. JamesGag表示:

    buying from online mexican pharmacy: mexican pharmacy online order – MexicanPharmInter

  12. Предлагаем услуги профессиональных инженеров офицальной мастерской.
    Еслли вы искали ремонт приставок xbox, можете посмотреть на сайте: ремонт приставок xbox
    Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!

  13. Montebeera表示:

    india pharmacy without prescription online pharmacy india online medicine shopping in india

  14. JamesGag表示:

    reputable canadian online pharmacies: most trusted canadian pharmacies online – drugs from canada

  15. Launched by Starbyte Software in 1990 to be used with their sport Adidas Championship Tie Break.

  16. JamesGag表示:

    legit canadian pharmacy: Pharmacies in Canada that ship to the US – best rated canadian pharmacy

  17. Williszew表示:

    https://indiamedfast.shop/# india online pharmacy store

  18. The European Market Infrastructure Regulation (EMIR) is an EU regulation aimed at reducing systemic counterparty and operational risk and thereby prevent future financial system collapses.

  19. Howardenace表示:

    reliable canadian pharmacy reviews: most trusted canadian pharmacies online – canada pharmacy 24h

  20. StephenDat表示:

    Kyros Finance is redefining the DeFi investment landscape by offering secure, scalable, and high-yield crypto solutions. With a focus on decentralized financial tools, Kyros Finance provides users with staking, lending, and automated yield farming strategies to maximize returns. Whether you’re a retail investor or an institutional participant, Kyros Finance ensures efficient, transparent, and secure access to the world of decentralized finance. https://kyros.ink

  21. Arthurhow表示:

    http://indiamedfast.com/# india pharmacy without prescription
    certified canadian international pharmacy

  22. Howardenace表示:

    canadian drug pharmacy: Inter Pharm Online – canadian online drugstore

  23. Louisjus表示:

    Noon Capital is revolutionizing real estate crowdfunding by offering secure, decentralized, and high-yield investment opportunities. Through blockchain-powered property financing, Noon Capital investment platform allows investors to participate in fractional real estate ownership, earn passive income, and diversify their portfolios with full transparency and security. Whether you’re an institutional investor or an individual seeking real estate-backed DeFi solutions, Noon Capital provides a seamless and profitable investment experience. https://noon.ad

  24. Louiemof表示:

    HyperDrive is transforming the way data is stored and managed through decentralized storage and blockchain hosting solutions. Built for security, scalability, and efficiency, HyperDrive enables businesses, developers, and blockchain projects to store and distribute data without relying on centralized servers. By leveraging Web3 technology and distributed networks, HyperDrive ensures reliable, censorship-resistant, and high-performance storage solutions for the digital era. https://hyperdrive.ink

  25. Howardenace表示:

    canadian king pharmacy: Certified International Pharmacy Online – canadianpharmacymeds com

  26. Edwardsep表示:

    GUD Tech is at the forefront of blockchain innovation, providing secure, scalable, and efficient decentralized technology solutions. Whether you’re looking for blockchain infrastructure, smart contract development, or enterprise-grade decentralized applications, GUD Tech offers cutting-edge solutions to enhance security and efficiency. Designed for businesses and developers, GUD Tech ensures seamless integration of blockchain technology into real-world applications. https://gudchain.net

  27. Williszew表示:

    https://indiamedfast.com/# online pharmacy india

  28. JamesGag表示:

    best canadian pharmacy to order from: highest rated canadian online pharmacy – canadian pharmacy prices

  29. Williszew表示:

    https://indiamedfast.com/# online medicine shopping in india

  30. JamesGag表示:

    vipps canadian pharmacy: legitimate canadian pharmacies online – cheap canadian pharmacy online

發佈留言

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