More Related Content
Similar to Speed up your web development
Similar to Speed up your web development (15)
Speed up your web development
- 1. Speed up your Web
Development
Ushering in 2012
Speaker : Spin Lai
Date : 2012/1/10
2012年1月10日星期二
- 5. 20%
Trying to get the layout to work using
only CSS before giving up and using table
2012年1月10日星期二
- 16. But I have code snippet
plugins for my IDE.
2012年1月10日星期二
- 22. HTML[ ]
[ ]Zen Code
<div id="content">
</div>
div#content
2012年1月10日星期二
- 23. HTML[ ]
[ ]Zen Code
<div id="content">
</div>
div#content
2012年1月10日星期二
- 24. HTML[ ]
[ ]Zen Code
<ul id="navigation">
<li></li>
<li></li>
<li></li>
</ul>
2012年1月10日星期二
- 25. HTML[ ]
[ ]Zen Code
<ul id="navigation">
<li></li>
<li></li>
<li></li>
</ul>
ul#navigation>li*3
2012年1月10日星期二
- 26. HTML[ ]
[ ]Zen Code
<ul id="navigation">
<li></li>
<li></li>
<li></li>
</ul>
ul#navigation>li*3
2012年1月10日星期二
- 27. HTML[ ]
[ ]Zen Code
<select id="jazz" name="" class="album">
<option value=""></option>
<option value=""></option>
</select>
2012年1月10日星期二
- 28. HTML[ ]
[ ]Zen Code
select#jazz.album>option*2
<select id="jazz" name="" class="album">
<option value=""></option>
<option value=""></option>
</select>
2012年1月10日星期二
- 29. HTML[ ]
[ ]Zen Code
select#jazz.album>option*2
<select id="jazz" name="" class="album">
<option value=""></option>
<option value=""></option>
</select>
2012年1月10日星期二
- 30. HTML[ ]
[ ]Zen Code
<div id="thediv">
<p class="first"></p>
<p class="second"></p>
</div>
2012年1月10日星期二
- 31. HTML[ ]
[ ]Zen Code
<div id="thediv">
<p class="first"></p>
<p class="second"></p>
</div>
div#thediv>p.first+p.second
2012年1月10日星期二
- 32. HTML[ ]
[ ]Zen Code
<div id="thediv">
<p class="first"></p>
<p class="second"></p>
</div>
div#thediv>p.first+p.second
2012年1月10日星期二
- 42. body {
margin: 0;
padding: 0;
background-color: #D1E7FF;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
div#main {
margin: 0 2em 0 2em;
padding: 0;
background: #FFF;
}
div#footer {
margin: 0 3em;
padding: 0.5em 0;
background: #FFF;
height: 64px;
background-image: url('images/inex_06.jpg');
}
2012年1月10日星期二
- 45. table#tb_product_grid {width: 100%;}
table#tb_product_grid td {margin: 0;padding: 0; text-align: center;}
table#tb_product_grid img{width: 350px;}
table#tb_LT_realtime th.y_desc {border-right: 1px solid #999; border-bottom: 1px solid #999;
background: #5A042C; color: #FFF; width: 22%;}
table#tb_LT_realtime th.x_var {background: #E7E5E5; width: 13%;}
table#tb_LT_realtime th.y_var {border: 1px solid #DDD;
padding: 0.25em 1.5em 0.25em 0;
text-align: right;}
.formbutton04{
cursor:pointer;
border:outset 1px #ccc;
background:#999;
color:#000;
font-family:Verdana,sans-serif;
font-weight:bold;
padding: 1px 2px;
background:url(images/formbg04.gif) repeat-x left top;
}
.btn3_mouseout {
BORDER-RIGHT: #2C59AA 1px solid; PADDING-RIGHT: 2px;
BORDER-TOP: #2C59AA 1px solid; PADDING-LEFT: 2px;
FONT-SIZE: 12px; FILTER:
progid:DXImageTransform.Microsoft.Gradient
(GradientType=0, StartColorStr=#ffffff,
EndColorStr=#C3DAF5); BORDER-LEFT: #2C59AA 1px
solid; CURSOR: hand; COLOR: black; PADDING-TOP: 2px;
BORDER-BOTTOM: #2C59AA 1px solid
}
.btn3_mouseover {
BORDER-RIGHT: #2C59AA 1px solid; PADDING-RIGHT: 2px;
BORDER-TOP: #2C59AA 1px solid; PADDING-LEFT: 2px;
FONT-SIZE: 12px; FILTER:
progid:DXImageTransform.Microsoft.Gradient
(GradientType=0, StartColorStr=#ffffff,
EndColorStr=#D7E7FA); BORDER-LEFT: #2C59AA 1px
solid; CURSOR: hand; COLOR: black; PADDING-TOP: 2px;
BORDER-BOTTOM: #2C59AA 1px solid
}
iv#display_img{
text-align: center;
margin: 0 0 0 2.5em;
width: 1000px;
}
div#img_name{
width: 1000px;
height:20px;
font-size: large;
text-align: center;
}
div#img_list_name{
padding:2px;
font-size: large;
height: 20px;
text-align: center;
width: 1000px;
}
div#down_gif{
margin: 0.5em 0 0 2.5em;
width:1000px;
/* height:20px; */
text-align:right;
cursor: pointer;
}
.ui-tabs { padding: .2em; zoom: 1; }.ui-tabs .ui-tabs-nav { list-style: none; position:relative; padding: .2em .2em 0; }.ui-tabs .ui-tabs-nav li { position: relative;float: left; border-bottom-width: 0 !important;margin: 0 .2em -1px 0; padding: 0; }.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; }.ui-tabs .ui-tabs-nav li.ui-tabs-selected{ padding-bottom: 1px; border-bottom-width: 0; }.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a{ cursor: text; }
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a{ cursor: pointer; } /* first selector in groupseems obsolete, but required to overcome bug inOpera applying cursor: text overall if definedelsewhere... */
.ui-tabs .ui-tabs-panel { padding: 1em 1.4em;display: block; border-width: 0; background:none; }
.ui-tabs .ui-tabs-hide { display: none !important; }
div.sitemap_layer_1{
border: 1px solid #B5D9EA;
margin: 0.5em 0 0 28px;
background: #D9F1FC;
padding: 0.25em 1em 0.25em 1em;
display: inline-block;
*display: inline; /
* This is for IE6 */
zoom: 1; /
* This is for inline-block in IE */
*display: inline !important; /
* This is for IE7 */
}
2012年1月10日星期二
- 57. [ CSS ] [ SCSS ]
#header {
margin-bottom: 50px;
}
#header h1 {
font-size: 24px;
color: red;
}
#header h1 a {
display: block;
}
#header ul.nav li {
float: left;
}
2012年1月10日星期二
- 58. [ CSS ] [ SCSS ]
#header {
margin-bottom: 50px;
}
#header h1 {
font-size: 24px;
color: red;
}
#header h1 a {
display: block;
}
#header ul.nav li {
float: left;
}
#header {
margin-bottom: 50px;
h1 {
font-size: 24px;
color: red;
a { display: block; }
}
ul.nav {
li { float:left; }
}
}
2012年1月10日星期二
- 59. [ CSS ] [ SCSS ]
#header {
margin-bottom: 50px;
}
#header h1 {
font-size: 24px;
color: red;
}
#header h1 a {
display: block;
}
#header ul.nav li {
float: left;
}
#header {
margin-bottom: 50px;
h1 {
font-size: 24px;
color: red;
a { display: block; }
}
ul.nav {
li { float:left; }
}
}
2012年1月10日星期二
- 60. [ CSS ] [ SCSS ]
#header {
margin-bottom: 50px;
}
#header h1 {
font-size: 24px;
color: red;
}
#header h1 a {
display: block;
}
#header ul.nav li {
float: left;
}
#header {
margin-bottom: 50px;
h1 {
font-size: 24px;
color: red;
a { display: block; }
}
ul.nav {
li { float:left; }
}
}
2012年1月10日星期二
- 61. [ CSS ]
#header {
margin-bottom: 50px;
}
#header h1 {
font-size: 24px;
color: red;
}
#header h1 a {
display: block;
}
#header ul.nav li {
float: left;
}
#header {
margin-bottom: 50px;
h1 {
font-size: 24px;
color: red;
a { display: block; }
}
ul.nav {
li { float:left; }
}
}
[ SCSS ]
2012年1月10日星期二
- 63. [ CSS ] [ SCSS ]
a, h1, h2, h3, h4, h5 {
color: #ff9900;
}
#header {
background: #ff9900;
}
.section {
padding: 10px;
margin-bottom: 20px;
}
2012年1月10日星期二
- 64. [ CSS ] [ SCSS ]
a, h1, h2, h3, h4, h5 {
color: #ff9900;
}
#header {
background: #ff9900;
}
.section {
padding: 10px;
margin-bottom: 20px;
}
$LINK_COLOR: #FF9900;
$MARGIN: 20px;
a, h1, h2, h3, h4, h5 {
color: $LINK_COLOR;
}
#header {
background: $LINK_COLOR;
}
.section {
padding: $MARGIN / 2;
margin-bottom: $MARGIN;
}
2012年1月10日星期二
- 65. [ CSS ] [ SCSS ]
a, h1, h2, h3, h4, h5 {
color: #ff9900;
}
#header {
background: #ff9900;
}
.section {
padding: 10px;
margin-bottom: 20px;
}
$LINK_COLOR: #FF9900;
$MARGIN: 20px;
a, h1, h2, h3, h4, h5 {
color: $LINK_COLOR;
}
#header {
background: $LINK_COLOR;
}
.section {
padding: $MARGIN / 2;
margin-bottom: $MARGIN;
}
2012年1月10日星期二
- 66. [ CSS ] [ SCSS ]
a, h1, h2, h3, h4, h5 {
color: #ff9900;
}
#header {
background: #ff9900;
}
.section {
padding: 10px;
margin-bottom: 20px;
}
$LINK_COLOR: #FF9900;
$MARGIN: 20px;
a, h1, h2, h3, h4, h5 {
color: $LINK_COLOR;
}
#header {
background: $LINK_COLOR;
}
.section {
padding: $MARGIN / 2;
margin-bottom: $MARGIN;
}
2012年1月10日星期二
- 67. [ CSS ] [ SCSS ]
a, h1, h2, h3, h4, h5 {
color: #ff9900;
}
#header {
background: #ff9900;
}
.section {
padding: 10px;
margin-bottom: 20px;
}
$LINK_COLOR: #FF9900;
$MARGIN: 20px;
a, h1, h2, h3, h4, h5 {
color: $LINK_COLOR;
}
#header {
background: $LINK_COLOR;
}
.section {
padding: $MARGIN / 2;
margin-bottom: $MARGIN;
}
2012年1月10日星期二
- 69. [ CSS ] [ SCSS ]
#navbar li {
border-top-radius: 10px;
-moz-border-radius-top: 10px;
-webkit-border-top-radius: 10px;
}
#footer {
border-top-radius: 10px;
-moz-border-radius-top: 10px;
-webkit-border-top-radius: 10px;
}
2012年1月10日星期二
- 70. [ CSS ] [ SCSS ]
@mixin rounded-top {
$RADIUS: 10px;
border-top-radius:
$RADIUS;
-moz-border-radius-top:
$RADIUS;
-webkit-border-top-radius:
$RADIUS;
}
#navbar li { @include rounded-
top; }
#footer { @include rounded-top; }
#navbar li {
border-top-radius: 10px;
-moz-border-radius-top: 10px;
-webkit-border-top-radius: 10px;
}
#footer {
border-top-radius: 10px;
-moz-border-radius-top: 10px;
-webkit-border-top-radius: 10px;
}
2012年1月10日星期二
- 71. [ CSS ] [ SCSS ]
@mixin rounded-top {
$RADIUS: 10px;
border-top-radius:
$RADIUS;
-moz-border-radius-top:
$RADIUS;
-webkit-border-top-radius:
$RADIUS;
}
#navbar li { @include rounded-
top; }
#footer { @include rounded-top; }
#navbar li {
border-top-radius: 10px;
-moz-border-radius-top: 10px;
-webkit-border-top-radius: 10px;
}
#footer {
border-top-radius: 10px;
-moz-border-radius-top: 10px;
-webkit-border-top-radius: 10px;
}
2012年1月10日星期二
- 73. [ CSS ] [ SCSS ]
.warn {
background: yellow;
}
.bad_warn {
background: yellow;
font-weight: bold;
color: red;
}
2012年1月10日星期二
- 74. [ CSS ] [ SCSS ]
.warn {
background: yellow;
}
.bad_warn {
@extend .warn;
font-weight: bold;
color: red;
}
.warn {
background: yellow;
}
.bad_warn {
background: yellow;
font-weight: bold;
color: red;
}
2012年1月10日星期二
- 75. [ CSS ] [ SCSS ]
.warn {
background: yellow;
}
.bad_warn {
@extend .warn;
font-weight: bold;
color: red;
}
.warn {
background: yellow;
}
.bad_warn {
background: yellow;
font-weight: bold;
color: red;
}
2012年1月10日星期二