import urllib2,os; 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())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print('Please restart Sublime Text to finish installation')
html:5
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
</body>
</html>
div
<div></div>
div#section.section
<div id="section" class="section"></div>
div+p
<div></div> <p></p>
ul.list>li*2
<ul class="list">
<li></li>
<li></li>
</ul>
table+
<table> <tr> <td></td> </tr> </table>
input:text.input-field
<input type="text" name="" id="" class="input-field">
<div class="header">
<div class="nav"></div>
</div>
<div class="content"></div>
<div class="footer"></div>
<header>
<nav></nav>
</header>
<section class="content"></section>
<footer></footer>
<header>
<nav>
<section>
<article>
<time></time>
<figure>
<figcaption>
<aside>
<footer>
More<input type="color">
<input type="range">
<input type="email">
<input type="number">
<input type="date">
<input type="tel">
<input type="url">
<input type="color">
<input type="range">
<input type="email">
<input type="tel">
<input type="url">
<input type="number">
<video></video>
<audio></audio>
<object type="application/x-shockwave-flash" id="flashContent" name="flashContent"
data="/brainshark/viewer/getplayer.ashx?v=201207121701" width="100%" height="100%"
style="visibility: visible; ">
<param name="scale" value="noscale">
<param name="wmode" value="window">
<param name="allowfullscreen" value="true">
<param name="allowscriptaccess" value="always">
<param name="bgcolor" value="">
<param name="SeamlessTabbing" value="false">
<param name="flashvars" value="pi=119002744&host=www.brainshark.com&securerequest=false&lng=en-GB,en-US;q=0.8,en;q=0.6">
</object>
<video src="movie.mp4"></video>
<audio src="music.mp3"></audio>
Element ~ Element
Element[attr^|*|$="value"]
Element:checked
Element:target
Element:last-child
Element:nth-child(n)
Element:only-child
border-radius: value;
.element{
border-radius: 5px;
}
border-radius: top-left top-right bottom-right bottom-left
.element{
border-radius: 2px 4px 6px 8px;
}
transition: property duration timing-function delay;
element{
transition: background 1s ease 0;
}
element{
-webkit-transition: background 1s ease 0;-moz-transition: background 1s ease 0;-ms-transition: background 1s ease 0;
-o-transition: background 1s ease 0;transition: background 1s ease 0;
}
transform: rotate(value);
transform: scale(x-value, y-value);
transform: skew(value);
transform: translate(x-value, y-value);
@font-face{
font-family: 'myFont';src: url('font.eot') format('embedded-opentype'),url('font.woff') format('woff'),url('font.ttf') format('truetype'),url('font.svg') format('svg');
}
<!--[if lt IE 9]>
<link rel="stylesheet" href="booo.css">
<![endif]>
<!--[if IE 7]> <html class="lt-ie9 lt-ie8"> <![endif]>
<!--[if IE 8]> <html class="lt-ie9"> <![endif]>
<!--[if gt IE 8]><!--> <html> <!--<![endif]-->
.shadow{
box-shadow: 0 0 3px #666;
}
.lt-ie9 .shadow{
border: solid 2px #666;
}
Basically, a CSS Object is a repeating visual pattern. Once created, an object can then be reused thoughout a site.
.btn{
background: #333;
border: solid .08em rgb(30,30,30);
border-radius: .1em;
color: #ededed;
font-size: 1em;
padding: .4em 1.2em;
text-transform: uppercase;
}
.btn-red{
background: rgb(185,0,0);
border-color: rgb(155,0,0);
}
.btn-blue{
background: rgb(0,60,120);border-color: rgb(0,60,90);
}
demo
<script src="js/jquery.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
...<script src="jquery.js"></script></body>
var Site = {
init:function(){
/* Code here */
}
};
$(function (){
Site.init();
})