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的特色有六點,分別是:
- HTML from CSS:如果你已經對CSS的選取器有概念,那就已經知道Emmet該如何去縮寫你的HTML代碼。
- Dynamic snippets:在使用縮寫的時候,只要稍微更動一些名稱,就可以得到截然不同的結果。
- Ultra-fast coding:快速的編寫模式,可以快速選取標籤、移動游標、產生上一層或下一層結構。
- Customizable:可以透過編輯JSON檔案來客製化一些程式碼。
- Platform for new tools:透過編輯開放的程式碼,可以產生新的使用模式。
- Highly portable:高度輕便可攜。
Emmet支援的網頁編輯器也非常多,如下圖所示:
Emmet 支援的網頁編輯器
快速鍵:
(快速鍵的部分有可能跟原先的編輯器或電腦的一些應用程式有衝突而無法使用)
- Tab:展開縮寫
- Ctrl+Alt+→:將游標移動到下一個可以輸入屬性或值的地方。
- Ctrl+Alt+←:將游標移動到上一個可以輸入屬性或值的地方。
- Ctrl+D:選取一整個標籤(包含標籤的起始與結束)。
- Shift+Ctrl+.:選取下一個標籤或屬性。
- Shift+Ctrl+,:選取上一個標籤或屬性。
- Ctrl+/:將選取的部分變成註解。
使用的部分功能相當多,可以參考官方網頁中的文件介紹,或是繼續閱讀馬老師針對Emmet的後續介紹。
Find out about Alisson https://liverpool.alisson-becker-cz.com‘s influence on Liverpool’s success, from his defense to personal achievements that made him one of the best goalkeepers in the world.
A study of the influence of Rodrigo https://realmadrid.rodrygo-cz.com on the success and marketing strategy of Real Madrid: analysis of technical skills, popularity in Media and commercial success.
Find out how Pedri https://barcelona.pedri-cz.com becomes a key figure for Barcelona – his development, influence and ambitions determine the club’s future success in world football.
How Karim Benzema https://alIttihad.karim-benzema-cz.com changed the game of Al-Ittihad and Saudi football: new tactics, championship success, increased viewership and commercial success.
We explore the path of Luka Modric https://realmadrid.luka-modric-cz.com to Real Madrid, from a difficult adaptation to legendary Champions League triumphs and personal awards.
The story of Robert Lewandowski https://barcelona.robert-lewandowski-cz.com, his impressive journey from Poland to Barcelona, ??where he became not only a leader on the field, but also a source of inspiration for young players.
The impact of the arrival of Cristiano Ronaldo https://annasr.cristiano-ronaldo-cz.com at Al-Nasr. From sporting triumphs to cultural changes in Saudi football.
Son Heung-min’s https://tottenhamhotspur.son-heung-min-cz.com success story at Tottenham Hotspur and his influence on the South Korean football, youth inspiration and changing the perception of Asian players.
Antoine Griezmann https://atlticomadrid-dhb.antoine-griezmann-cz.com Atletico Madrid star whose talent and decisive goals helped the club reach the top of La Liga and the UEFA Champions League.
Lionel Messi https://intermiami.lionel-messi-cz.com, one of the best football players of all time, moves to Inter Miami” and changes the face of North American football.
Bernardo Mota Veiga de Carvalho e Silva https://manchestercity.bernardo-silva-cz.com Portuguese footballer, club midfielder Manchester City and the Portuguese national team.
Полезные советы и пошаговые инструкции по строительству https://svoyugol.by, ремонту и дизайну домов и квартир, выбору материалов, монтажу и установке своими руками.
The inspiring story of how talented Kevin De Bruyne https://manchestercity.kevin-de-bruyne-cz.com became the best player of Manchester City and the Belgium national team. From humble origins to the leader of a top club.
Mohamed Salah https://liverpool.mohamed-salah-cz.com, who grew up in a small town in Egypt, conquered Europe and became Liverpool star and one of the best players in the world.
The fascinating story of the rise of Brazilian prodigy Vinicius Junior https://realmadrid.vinicius-junior-cz.com to the heights of glory as part of the legendary Madrid “Real”
https://rolaks.com отделочные материалы для фасада – интернет-магазин
Изготовим для Вас изделия из металла https://smith-moskva.blogspot.com, по вашим чертежам или по нашим эскизам.
Промышленные насосы https://1nsk.ru/news/articles/nasosy-spetsialnogo-naznacheniya.html Wilo предлагают широкий ассортимент решений для различных отраслей промышленности, включая водоснабжение, отопление, вентиляцию, кондиционирование и многие другие. Благодаря своей высокой производительности и эффективности, насосы Wilo помогают снизить расходы на энергию и обслуживание, что делает их идеальным выбором для вашего бизнеса.
Harry Kane’s journey https://bavaria.harry-kane-cz.com from Tottenham’s leading striker to Bayern’s leader and Champions League champion – this is the story of a triumphant ascent to the football Olympus.
Great site! I recommend to everyone!Best hotels Guide with price
French prodigy Kylian Mbappe https://realmadrid.kylian-mbappe-cz.com is taking football by storm, joining his main target, ” Real.” New titles and records are expected.
The site is dedicated to football https://fooball-egypt.com, football history and news. Latest news and fresh reviews of the world of football
The path of 21-year-old Jude Bellingham https://realmadrid.jude-bellingham-cz.com from young talent to one of the most promising players in the world, reaching new heights with Dortmund and England.
Открытие для себя Ерлинг Хааланда https://manchestercity.erling-haaland-cz.com, a talented player of «Manchester City». Learn more about his skills, achievements and career growth.
ascorbic acid where to buy – ciprodex ophthalmic solution brand compro pills
News, tournaments, guides and strategies about the latest GTA games https://gta-ar.com. Stay tuned for the best GTA gaming experience
Latest news https://android-games-ar.com about Android games, reviews and daily updates. The latest information about the most exciting games.
Discover the wonderful world of online games https://game-news-ar.com. Get the latest news, reviews and tips for your favorite games.
Minecraft news https://minecraft-ar.com, guides and in-depth reviews of the gaming features available in Minecraft Ar. Get the latest information on downloading Minecraft, Pocket Edition and Bedrock Edition.
News and events of the American Basketball League https://basketball-eg.com in Egypt. Hot events, player transfers and the most interesting events. Explore the world of the NBA with us.