關於sublime 與zen coding 使用

安裝:ui

   使用的是sublime2:  url

      1.呼出命令行:ctrl+`    spa

      2.在命令行中輸入  sublime2:     import urllib2,os,hashlib; h = 'eb2297e1a458f27d836c04bb0cbaf282' + 'd0e7a3098092775ccb37ca9d6b2e4b7d'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler()) ); by = urllib2.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb' ).write(by) if dh == h else None; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) if dh != h else 'Please restart Sublime Text to finish installation')命令行

 

      若是是sublime3: 3d

       import urllib.request,os,hashlib; h = 'eb2297e1a458f27d836c04bb0cbaf282' + 'd0e7a3098092775ccb37ca9d6b2e4b7d'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)rest

 

 

      從新啓動sublime。讓其完成安裝 blog

 

      3.ctrl+shift+p  呼出安裝擴展包ip

      4.輸入 install  選擇以下所示:hash

      5.輸入emmet:emmet 安裝it

      呼出zen coding  ctrl+shift+enter    

       

 

 

使用規則    

 

使用ZenCoding編寫代碼時,須要遵循必定的縮寫規則:
 
  • E
    元素名(div、p);
  • E#id
    帶Id的元素(div#content、p#intro、span#error);
  • E.class
    帶class的的元素(div.header、p.error),id和class能夠連着寫,div#content.column
  • E>N
    子元素(div>p、div#footer>p>span)
  • E*N
    多項元素(ul#nav>li*5>a)
  • E+N
    多項元素
  • E$*N
    帶序號的元素

 

 

 

相關文章
相關標籤/搜索