Emmet 網頁開發界的超跑

在這個速度的時代,網頁也擁有非常多加速開發的工具,例如今天要介紹的這個外掛「Emmet」,他支援的開發軟體也相當多,也就是不管腳踏車、機車還是房車,都可以裝上這個超跑的引擎,廢話不多說,先讓大家知道他如何節省網頁開發的時間,如果我們在網頁上要輸入以下的HTML結構:

<div>
    <ul>
       <li><a href="#">選項1</a></li>
       <li><a href="#">選項2</a></li>
       <li><a href="#">選項3</a></li>
       <li><a href="#">選項4</a></li>
       <li><a href="#">選項5</a></li>
       <li><a href="#">選項6</a></li>
    </ul>
</div>

在我們安裝好Emmet之後,僅需輸入以下的縮寫,再按下Tab鍵,即可以產生如上述般的HTML結構:

div>ul>li*6>a[#]{選項$}

仔細看看應該不難發現HTML標籤名稱的部分都在縮寫裡面,只是利用>來區隔每一層,如果要多個同樣的標籤可以用*後來輸入個數,標籤內的屬性值是利用[ ]來包住,{ }是標籤內的值。

是不是很神奇呀?趕快到Emmet的官方網頁下載或直接利用你的網頁編輯器來安裝這個外掛吧!

Emmet 官方網站截圖
Emmet 官方網站截圖

官方網站提到Emmet的特色有六點,分別是:

  • HTML from CSS:如果你已經對CSS的選取器有概念,那就已經知道Emmet該如何去縮寫你的HTML代碼。
  • Dynamic snippets:在使用縮寫的時候,只要稍微更動一些名稱,就可以得到截然不同的結果。
  • Ultra-fast coding:快速的編寫模式,可以快速選取標籤、移動游標、產生上一層或下一層結構。
  • Customizable:可以透過編輯JSON檔案來客製化一些程式碼。
  • Platform for new tools:透過編輯開放的程式碼,可以產生新的使用模式。
  • Highly portable:高度輕便可攜。

Emmet支援的網頁編輯器也非常多,如下圖所示:

Emmet 支援的網頁編輯器

Emmet 支援的網頁編輯器

快速鍵:

(快速鍵的部分有可能跟原先的編輯器或電腦的一些應用程式有衝突而無法使用)

  • Tab:展開縮寫
  • Ctrl+Alt+→:將游標移動到下一個可以輸入屬性或值的地方。
  • Ctrl+Alt+←:將游標移動到上一個可以輸入屬性或值的地方。
  • Ctrl+D:選取一整個標籤(包含標籤的起始與結束)。
  • Shift+Ctrl+.:選取下一個標籤或屬性。
  • Shift+Ctrl+,:選取上一個標籤或屬性。
  • Ctrl+/:將選取的部分變成註解。

使用的部分功能相當多,可以參考官方網頁中的文件介紹,或是繼續閱讀馬老師針對Emmet的後續介紹。

You may also like...

6,862 Responses

  1. Danieljek表示:

    where can i buy amoxicillin over the counter http://clomidrexpharm.com/# cost generic clomid no prescription

  2. Reading The work is like gazing at a masterpiece; every detail contributes to a breathtaking whole.

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

  4. CharlesHog表示:

    Aerodrome Finance: Unlocking Potential for Growth
    The world of aerodrome finance is pivotal for ensuring the efficient operation, enhancement, and expansion of aerodrome facilities globally. With the increasing demand for air travel, understanding aerodrome financial processes is more important than ever.
    Aerodrome Finance
    Why Aerodrome Finance Matters
    Aerodrome finance plays a critical role in the lifespan of airport projects, providing necessary funding from initial development to ongoing management. Here are key reasons why it matters:

    Infrastructure Development: Secure financial backing enables the construction and maintenance of essential airport infrastructure.
    Operational Efficiency: Adequate funding ensures that airports can operate smoothly, adapting to technological advancements and logistical demands.
    Economic Growth: Airports serve as economic hubs; their development stimulates job creation and boosts local economies.
    Aerodrome Finance Strategies
    Various strategies can be employed to optimize aerodrome finance, ensuring both immediate and long-term benefits. Here are a few notable approaches:

    Public-Private Partnerships (PPP)
    These partnerships combine public sector oversight and private sector efficiency, leading to shared risks and rewards. They facilitate diverse financial resources and innovative solutions for airport projects.

    Revenue Diversification
    Exploring non-aeronautical revenue streams, such as retail concessions and property leases, can significantly bolster an airport’s financial resilience. Such diversification allows for a steady income flow independent of ticket sales.

    Sustainable Financing
    Adopting sustainable financial practices, including green bonds and ESG (Environmental, Social, and Governance) criteria, aligns with modern ecological standards and attracts environmentally conscious investors.

  5. JeffreyVog表示:

    Chainlist: Simplifying Blockchain Connections
    In the evolving world of cryptocurrencies, Chainlist emerges as a pivotal tool for users looking to seamlessly interact with various blockchain networks. Understanding what Chainlist offers and how it operates can significantly enhance your crypto experience.
    chainlist org
    What is Chainlist?
    Chainlist is a user-friendly platform designed to facilitate easy connections between crypto wallets and blockchain networks. It caters to both new and experienced crypto users by providing a comprehensive list of blockchain networks that can be accessed with just a few clicks.

    Key Features of Chainlist
    Extensive Network List: Chainlist provides access to a vast selection of blockchain networks, ensuring users can connect to the network of their choice with ease.
    Seamless Wallet Integration: With Chainlist, users can connect their crypto wallets such as MetaMask efficiently, facilitating quick and secure transactions.
    User-Friendly Interface: The platform’s intuitive design ensures a smooth user experience, making it easy for beginners to navigate through different blockchain networks.
    Why Use Chainlist?
    Using Chainlist can considerably enhance your blockchain interactions by simplifying the network connection process. Here are some reasons why you should consider using Chainlist:

    Reduce Errors: Minimize the chances of manually inputting incorrect network details.
    Save Time: Quickly switch between networks without having to tweak wallet settings manually.
    Broaden Access: Easily explore lesser-known or new blockchains without extensive setup procedures.
    How to Connect Your Wallet Using Chainlist
    Visit the .
    Search for the blockchain network you wish to connect with.
    Click on the “Connect Wallet” button next to your desired network.
    Authorize the connection through your wallet’s interface, such as MetaMask.
    Begin your crypto transactions on the selected network.
    In summary, Chainlist serves as a crucial bridge between crypto users and blockchain networks, offering a simplified connection process that enhances both functionality and accessibility.

    Welcome to Chain List: Your Comprehensive Blockchain Directory
    Are you looking for a simple way to connect to different blockchain networks? Chain List offers a seamless solution, allowing users to discover and connect to thousands of blockchain networks rapidly and efficiently.

    What is Chain List?
    Chain List is a user-friendly platform designed to help cryptocurrency enthusiasts, developers, and investors explore various blockchain networks. With a focus on decentralized technologies, it provides a vast database of available networks, offering quick, reliable connections for users.

  6. RobertSam表示:

    What is DeBridge Finance?
    DeBridge Finance is an innovative solution designed to facilitate seamless cross-chain blockchain operations. It empowers developers and users by allowing the transfer of data and assets across different blockchain networks efficiently and securely.
    Debridge Finance
    Key Features of DeBridge Finance
    DeBridge Finance stands out due to its remarkable features which include:

    Interoperability: The platform provides effective interoperability between multiple blockchains, eliminating the boundaries that exist.
    Security: By leveraging advanced security protocols, DeBridge ensures the safe transit of data and assets.
    Scalability: It is designed to handle a growing number of transactions without compromising on performance.
    How Does DeBridge Finance Work?
    DeBridge Finance operates through a combination of smart contracts and decentralized communication protocols. These components work together to authenticate and execute cross-chain data and asset transfers swiftly and securely.

    Smart Contracts
    The platform utilizes smart contracts to automate processes and ensure trustless operations across different chain environments.

    Decentralized Communication
    Communication across blockchains is made possible through a decentralized message protocol, enabling effective data sharing.

    Benefits of Using DeBridge Finance
    Choosing DeBridge Finance for cross-chain operations brings several advantages:

    Cost-Effectiveness: By integrating various blockchains, it reduces the cost and complexity of using multiple networks.
    Developer-Friendly: Offering robust tools and resources, DeBridge makes it easier for developers to build cross-chain applications.
    Enhanced User Experience: Users benefit from smoother transactions without the need to switch between different network interfaces.

  7. Узнай все о варикоцеле слева у мужчин варикоцеле слева у мужчин

  8. Qcmtvw表示:

    バイアグラ – 50mg/100mg – シアリス処方 г‚їгѓЂгѓ©гѓ•г‚Јгѓ«гЃ®йЈІгЃїж–№гЃЁеЉ№жћњ

  9. Узнай все о варикоцеле яичка у мужчины на что влияет варикоцеле

  10. вывод из запоя на дому ростов недорого вывод из запоя на дому ростов недорого .

  11. вывод. из. запоя. ростов. на. дону. http://gaslo.ukrbb.net/viewtopic.php?f=13&t=3407/ .

  12. вывод из запоя дешево ростов-на-дону https://recordrpservak.ukrbb.net/viewtopic.php?f=31&t=1155/ .

  13. Bradleygoath表示:

    rexall pharmacy amoxicillin 500mg how to buy amoxicillin online amoxicillin 500 mg tablet

  14. StevenLoN表示:

    Unlock the Power of Eigenlayer
    As the blockchain landscape evolves, Eigenlayer emerges as a beacon of innovation, offering robust solutions to enhance blockchain security and customization. But what exactly does Eigenlayer bring to the table?
    [url=https://eiglifi.net/]eigenlayer airdrop[/url]
    Revolutionizing Blockchain Security
    Security is paramount in the blockchain world, and Eigenlayer takes this seriously. By leveraging state-of-the-art technology, Eigenlayer provides an unparalleled layer of protection for blockchain protocols. This ensures that transactions are not only secure but also reliable.

    Advanced Encryption: Protects data integrity and confidentiality.
    Scalable Solutions: Ensures that security measures grow with your network’s demand.
    Customization like Never Before
    One of the most compelling features of Eigenlayer is its customization capabilities. Understanding that each blockchain project has unique needs, Eigenlayer offers a flexible architecture allowing projects to tailor solutions to their specific requirements.

    Modular Design: Adapts to various use cases without sacrificing performance.
    Interoperability: Seamlessly integrates with existing blockchain systems.
    Empowering Blockchain Ecosystems
    By providing these advanced features, Eigenlayer doesn’t just offer protection and customization; it empowers blockchain developers to push the boundaries of what’s possible. With Eigenlayer, the limitations often faced in blockchain scalability and security are becoming a thing of the past.

    Whether you are a developer seeking better security solutions or an entrepreneur aiming to launch your blockchain project with tailor-made features, Eigenlayer provides the tools and the support you need to succeed in the competitive digital landscape.

    Explore the potential of Eigenlayer today, and step into the future of blockchain technology with a partner committed to your success.

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

  16. StevenNub表示:

    dapoxetine price: Priligy tablets – buy priligy max pharm

  17. Danieljek表示:

    amoxicillin azithromycin http://prednisoneraypharm.com/# generic over the counter prednisone

發佈留言

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