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,839 Responses

  1. вывод из запоя в ростове на дону http://family2.quadrobb.me/viewtopic.php?id=1836#p6861 .

  2. Здесь можно преобрести сейф купить в москве сейфы простые

  3. JeromeTox表示:

    Optimize your trades across hundreds of DEXes on multiple networks
    1inch wallet
    1inch Exchange is a decentralized exchange aggregator. It searches multiple DEXs to find the most efficient path for your trade, thus minimizing costs and maximizing returns. By splitting your transaction into parts and executing them across different platforms, 1inch achieves the best possible market rates.
    Explore the 1inch Network: The Future of DeFi
    The 1inch Network stands at the forefront of decentralized finance (DeFi), offering traders highly efficient cryptocurrency swap solutions across multiple platforms. This introduction to 1inch will guide you through its features, benefits, and the impact it’s making in the crypto trading ecosystem.

    What Makes 1inch Unique?
    1inch is renowned for being a decentralized exchange aggregator. It sources liquidity from various exchanges to offer users the best possible rates. By splitting orders across multiple platforms, 1inch minimizes slippage and maximizes the value from each trade.

    Core Components of 1inch
    1inch Aggregation Protocol: A sophisticated routing mechanism that finds the most efficient swapping paths across multiple decentralized exchanges.

    1inch Liquidity Protocol: An automated market maker (AMM) that operates in a gas-efficient way, allowing users to provide liquidity and earn a portion of trades.

    1inch DAO: A decentralized autonomous organization that allows token holders to participate in the governance of the network.

    Benefits of Utilizing 1inch
    By tapping into 1inch’s ecosystem, traders gain access to:

    Optimal Rates: The cutting-edge algorithm ensures you’re always getting the best prices available.

    Security and Trust: As a non-custodial service, your funds remain under your control at all times.

    Reduced Slippage: Smart order routing minimizes discrepancies in pricing.

    Community-Driven: Participate in the governance processes thanks to the 1inch DAO.

  4. The Aviator game is a favorite among Indian players for its real-time betting and intense strategy. Choose to play for real money or try the demo mode to learn the mechanics risk-free. It’s all about when you pull the trigger!

    avaitor game play aviator online .

  5. AndreFuh表示:

    Welcome to Stargate Finance
    Stargate Finance is revolutionizing the way you engage with decentralized financial services. Our platform is designed to offer a secure, efficient, and user-friendly experience for all your financial needs in the world of decentralized finance.
    stargate finance bridge
    Why Choose Stargate Finance?
    In the rapidly evolving world of decentralized finance (DeFi), Stargate Finance stands out as a trusted platform due to its innovative solutions and user-centric approach. Here are some reasons to choose us:

    Seamless integration with major blockchain ecosystems
    Advanced security protocols to protect your assets
    User-friendly interface for beginners and experts alike
    Core Features of Stargate Finance
    Stargate Finance provides a variety of features to enhance your DeFi experience, including:

    Cross-Chain Transactions: Safely send and receive assets across different blockchain networks.
    Liquidity Provision: Earn rewards by providing liquidity to various liquidity pools.
    Yield Farming: Maximize your returns through strategic yield farming opportunities.
    How to Get Started
    Getting started with Stargate Finance is simple:

    Visit our official website and create an account.
    Connect your crypto wallet and fund your account with preferred assets.
    Explore our platform’s features and start managing your investment portfolio.

  6. быстрый вывод из запоя ростов superstar.ukrbb.net/viewtopic.php?f=3&t=680 .

  7. вывод из запоя цены ростов на дону https://golosa.ukrbb.net/viewtopic.php?f=3&t=7466 .

  8. FreddieDIG表示:

    How to Securely Log Into Debank: A Step-by-Step Guide
    Logging into your Debank account is the first step towards managing your DeFi portfolio. Ensuring that your login credentials remain secure is crucial for protecting your investments. In this guide, we’ll walk you through the process of logging into Debank safely and efficiently.
    debank profile search
    Step 1: Visit the Official Debank Website
    Start by navigating to the official Debank website. Avoid using search engine results to prevent phishing attacks. The URL should be .

    Step 2: Click on the Login Button
    On the homepage, locate the Login button usually positioned at the top right corner of the page. Click on it to proceed to the login page.

    Step 3: Enter Your Credentials
    Input your registered email address and password. Ensure your password is strong, combining letters, numbers, and symbols to enhance security.

    Step 4: Two-Factor Authentication
    It’s recommended to enable Two-Factor Authentication (2FA) for an additional security layer. This can be done using an app like Google Authenticator. Enter the code generated by your 2FA app to continue.

    Step 5: Secure Your Account
    Regularly Update Your Password: Change your password every 3-6 months.

    Use a Password Manager: Helps store and recall complex passwords without difficulty.

    Monitor Account Activity: Regularly check for any unauthorized access or activity.

    Additional Tips for Staying Safe Online
    Be vigilant about where you input your credentials. Always ensure that you have a secure and reliable internet connection. Avoid accessing your Debank account on public Wi-Fi networks, which might be unsecured.

    By following these guidelines, you can enhance the security of your Debank login process and safeguard your investments effectively. Stay aware of the latest security practices and updates from Debank to keep your account secure.

  9. Тут можно преобрести сейф противопожарный купить купить огнестойкий сейф в москве

  10. Thomasdag表示:

    Base is for everyone.
    Base Bridge is a cutting-edge solution facilitating smooth transfers between different blockchain networks. By creating a seamless link, it reduces the complexity and cost of blockchain transactions.
    base bridge eth
    What is Base Bridge?
    Base Bridge is a cutting-edge solution facilitating smooth transfers between different blockchain networks. By creating a seamless link, it reduces the complexity and cost of blockchain transactions.

    Key Features of Base Bridge
    Interoperability: Connects multiple blockchain networks, allowing for smooth asset exchange.

    Cost Efficiency: Reduces transaction fees significantly.

    Security: Leverages advanced encryption to protect transactions.

    Scalability: Easily adapts to increasing volumes of transactions without compromising speed.

    Benefits of Using Base Bridge
    Incorporating Base Bridge into your blockchain strategy offers numerous benefits:

    Simplified Transactions: Eliminates the need for complicated cross-chain processes.

    Faster Settlements: Enjoy quicker transaction confirmations.

    Cost-Effective Operations: Lower fees mean more sustainable transactions.

    Improved Security: Benefit from enhanced protection against fraud and hacking.

  11. Тут можно преобрести сейф для карабина купить сейф для сайги

  12. Sazrwun表示:

    Покупка школьного аттестата с упрощенной программой: что важно знать

    serrok.kabb.ru/viewtopic.php?f=3&t=254

  13. вывод из запоя ростов-на-дону kvitka.ukrbb.net/viewtopic.php?f=58&t=28000 .

  14. вывод из запоя круглосуточно http://gov.ukrbb.net/viewtopic.php?f=3&t=6368/ .

  15. вывод из запоя в стационаре ростов-на-дону https://www.pokupki.bestforums.org/viewtopic.php?f=7&t=24033 .

  16. Тут можно преобрести сейф сейфы оружейный оружие сейфы для оружия москва

  17. Тут можно преобрести сейф огнеупорный сейфы от пожара

  18. Тут можно преобрести сейф огнестойкий купить купить сейф противопожарный

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

  20. вывод. из. запоя. на. дому. ростов. honey.ukrbb.net/viewtopic.php?f=45&t=16673 .

  21. Diplomi_zoEa表示:

    можно купить диплом об окончании 1oriks-diplom199.ru .

發佈留言

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