Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Zen Coding.
Search
cssrain
September 02, 2014
Technology
120
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Zen Coding.
一种快速编写代码的方法
cssrain
September 02, 2014
More Decks by cssrain
See All by cssrain
UED工作流程分享和交流
cssrain
1
500
解读HTML
cssrain
0
170
解读HTML5
cssrain
2
190
基础CSS(1)
cssrain
0
180
基础CSS(2)
cssrain
0
130
高效的CSS
cssrain
0
180
高级CSS—继承
cssrain
0
150
PhoneGap分享和交流
cssrain
0
120
PhoneGap实践
cssrain
0
93
Other Decks in Technology
See All in Technology
老害フォレンジッカーはAI羊の夢を見るか?
tadmaddad
0
310
メルカリのグローバルアプリで挑んだ AlloyDB 運用と課題解決の実践記
hatappi
0
240
【CEDEC2026】専門性の高いデフォルメチームが挑んだ人材育成戦略 〜Cygames Academiaの企画から実施まで〜
cygames
PRO
0
530
Service Connect 上のサービスに ECS Service の外側から到達できなかった話
ota1022
1
180
ガバメントクラウドでのランサムウェア対策
techniczna
2
1k
toio・myCobotでフィジカルAIっぽいことを行うための検討(とりあえず調査) / フィジカルAI LT(IoTLTによる開催)
you
PRO
0
300
Goでデータパイプラインを作ろう
sansantech
PRO
1
360
AIは実装を速くする。では、私たちは何を今作るべきか?-立場を越えてリリースに向き合ったチーム開発の実践 / 20260801 Hiromi Nakaya and Naoki Takahashi
shift_evolve
PRO
3
450
取引先から届く 「セキュリティチェックシート」の読み解き方
kamadamakoto
0
140
修正PRを食べてレビュースキルが賢くなる:Claude Codeによる自己改善サイクル
yuyaumetsu
6
1.4k
Bill One 開発エンジニア 紹介資料
sansan33
PRO
7
19k
変化の早いClaude Codeを 書籍に落とし込む
oikon48
7
1.3k
Featured
See All Featured
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
470
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
450
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Darren the Foodie - Storyboard
khoart
PRO
3
3.6k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
56k
How to train your dragon (web standard)
notwaldorf
97
6.7k
ラッコキーワード サービス紹介資料
rakko
1
4.3M
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
210
Transcript
Zen Coding 一种快速编写HTML/CSS代码的方法 UED分享 · 交流 http://cssrain.github.io
哪些原因导致你写HTML变慢? • 很长,难记标签代码 (doctype) • 丌常写,丌熟悉的标签代码 (link) • 语义化的代码 (img的alt和title)
• Html的所有属性,括号,引用都要写完整 (dl+) • ……
记得它吗,能写出来吗? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF- 8" /> <title></title> </head> <body> </body> </html>
html:xt 演示
有什么方式快速写出? <div id="content"> <div class="page_top"> <p class="hdwrap"></p> <h1></h1> </div> <div
class="column"></div> <div class="column"></div> </div>
div#content>(div.page_top>p.hdwrap+h1)+div.column *2 演示
太复杂?拆开来 <div id="content"> <div class="page_top"> <p class="hdwrap"></p> <h1></h1> </div> <div
class="column"></div> <div class="column"></div> </div> div#content > ( div.page_top > p.hdwrap+h1 ) + div.column*2
丌就是CSS嘛 E 元素名称(div, p); E#id 使用id的元素(div#content, p#intro, span#error); E.class 使用类的元素(div.header,
p.error.critial). 你也可以联合使用class和idID: div#content.column.width; E>N 子代元素(div>p, div#footer>p>span); E+N 兄弟元素(h1+p, div#header+div#content+div#footer); E*N 元素倍增(ul#nav>li*5>a); E$*N 条目编号 (ul#nav>li.item-$*5);
这就是Zen Coding 由两个核心组件组成: • 一个缩写扩展器(缩写为像CSS一样的选择器) • 上下文无关的HTML标签对匹配器
支持大多数开发工具 • Visual Studio • TopStyle • Vim • IntelliJ
IDEA/WebStorm/PHPStorm • Aptana • Dreamweaver , Sublime Text,Editplus……
Zen Coding 资料 http://code.google.com/p/zen-coding/ https://github.com/sergeche/zen-coding/
Q&A 谢谢聆听