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>
Отличный сатй! Всем рекомендую!вскрытие замков
I truly love your website.. Pleasant colors & theme. Did you make this website yourself? Please reply back as I’m trying to create my own personal website and would like to find out where you got this from or what the theme is called. Kudos!
Good information. Lucky me I recently found your site by accident (stumbleupon). I have book-marked it for later!
Excellent site you’ve got here.. It’s hard to find quality writing like yours nowadays. I seriously appreciate people like you! Take care!!
I have to thank you for the efforts you’ve put in penning this website. I am hoping to check out the same high-grade content by you in the future as well. In truth, your creative writing abilities has inspired me to get my own, personal blog now 😉
Spot on with this write-up, I really feel this amazing site needs a great deal more attention. I’ll probably be back again to read more, thanks for the advice!
Right here is the perfect website for anyone who wants to find out about this topic. You realize so much its almost tough to argue with you (not that I personally will need to…HaHa). You definitely put a fresh spin on a subject which has been written about for a long time. Great stuff, just excellent.
There is certainly a lot to find out about this topic. I really like all of the points you made.
There is noticeably a lot of money to know about this. I assume you made particular nice points in features also.
Wow, incredible blog layout! How long have you been blogging for? you made blogging look easy. The overall look of your web site is great, let alone the content!
Good day! I just would like to give you a huge thumbs up for the great info you’ve got right here on this post. I will be returning to your website for more soon.
Отличный сатй! Всем рекомендую!скупка золота москва
Hey, what kind of anti-spam plugin do you use for your blog.*:’;*
I’ll immediately grab your rss as I can’t find your email subscription link or e-newsletter service. Do you have any? Kindly let me know so that I could subscribe. Thanks.
The Linden method is known cure for anxiety conditions seen in many people all over the world. The creator’s long time research and study made it a dependable treatment for the disorder.
OMG yes! People let me tell you bout my best friend. Best theme song ever! I remember staying up on Saturday nights with my parents and wed watch Mary Tyler Moore, The Bob Newhart show then Carol Burnett. Those were the best of times!
Thanks a lot for giving everyone an extraordinarily brilliant chance to read articles and blog posts from this blog.
I dont think Ive caught all the angles of this subject the way youve pointed them out. Youre a true star, a rock star man. Youve got so much to say and know so much about the subject that I think you should just teach a class about it
Howdy! Do you use Twitter? I’d like to follow you if that would be ok. I’m undoubtedly enjoying your blog and look forward to new posts.
Wow, wonderful blog layout! How long have you been running a blog for? you make blogging look easy. The overall look of your site is magnificent, let alone the content!
I’ve recently started a web site, the info you offer on this website has helped me tremendously. Thanks for all of your time & work.
I always visit new blog everyday and i found your blog.’”‘*;
This is a very good tip especially to those fresh to the blogosphere. Brief but very precise information… Many thanks for sharing this one. A must read post!
You’re so cool! I do not think I’ve truly read through a single thing like that before. So great to discover somebody with some original thoughts on this issue. Seriously.. many thanks for starting this up. This web site is one thing that’s needed on the web, someone with some originality.
Woh I enjoy your articles , saved to favorites ! .
I adore examining and I believe this website got some really useful stuff on it! .
I need to to thank you for this good read!! I absolutely loved every bit of it. I’ve got you book marked to look at new things you post…
if you really need to become expert in driving, your really need to enroll in a driving school,.
You have made some really good points there. I checked on the internet for more info about the issue and found most people will go along with your views on this website.
An interesting discussion is worth comment. I do believe that you need to write more on this subject matter, it may not be a taboo matter but usually folks don’t discuss these topics. To the next! Kind regards!