用sublime text的同学少不了会安装emmet插件.其实上手简单,但是很多技巧还是需要一些时间来研究的,这次我找到了emmet插件内的snippets.json文件,一般是位于..\(目录路径)\Sublime Text 3\Data\Packages\Emmet\emmet(这里使用的是sublime text 3),如果未找到,也可以将..\Data\Installed Packages\Emmet.sublime-package文件解压出来(我直接用7-zip解压,winRAR未测试),解压后找到..\Emmet\emmet\内的snippets.json打开一样可以查看…
<!DOCTYPE html>
<html>
<head>
<title>css * cannot use display property</title>
</head>
<style type="text/css">
* {display: block;border: 1px solid #f00;padding: 10px;margin-bottom: 10px;}
body {background-color: #fc0;}
</style>
<body>
<p>body with background color but styles come out too! we dont want this happen!</p>
<span>you can also try it yourself :)</span>
<img src="#" width="300" height="300" />
<a href="#">all blocks now?!</a>
</body>
</html>