Welcome, Old Sport!

非常有用的CSS模板

by ilikecss ON 2011/10/08 12547

下面是CSS模板清单,将帮助您减少手酸,烦恼,节省您在写CSS的时间了,我希望你会发现它很有用。无论你是一个有经验的Web开发者,或刚开始使用CSS的初学者,都值得一试。

CSS Reset (CSS固定样板)

/* http://meyerweb.com/eric/tools/css/reset/
   v2.0 | 20110126
   License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

Browser-Specific CSS Hacks (浏览器特定CSSHacks)

/* IE6 and below */
* html #uno  { color: red }

/* IE7 */
*:first-child+html #dos { color: red } 

/* IE7, FF, Saf, Opera  */
html>body #tres { color: red }

/* IE8, FF, Saf, Opera (Everything but IE 6,7) */
html>/**/body #cuatro { color: red }

/* Opera 9.27 and below, safari 2 */
html:first-child #cinco { color: red }

/* Safari 2-3 */
html[xmlns*=""] body:last-child #seis { color: red }

/* safari 3+, chrome 1+, opera9+, ff 3.5+ */
body:nth-of-type(1) #siete { color: red }

/* safari 3+, chrome 1+, opera9+, ff 3.5+ */
body:first-of-type #ocho {  color: red }

/* saf3+, chrome1+ */
@media screen and (-webkit-min-device-pixel-ratio:0) {
 #diez  { color: red  }
}

/* iPhone / mobile webkit */
@media screen and (max-device-width: 480px) {
 #veintiseis { color: red  }
}

/* Safari 2 - 3.1 */
html[xmlns*=""]:root #trece  { color: red  }

/* Safari 2 - 3.1, Opera 9.25 */
*|html[xmlns*=""] #catorce { color: red  }

/* Everything but IE6-8 */
:root *> #quince { color: red  }

/* IE7 */
*+html #dieciocho {  color: red }

/* Firefox only. 1+ */
#veinticuatro,  x:-moz-any-link  { color: red }

/* Firefox 3.0+ */
#veinticinco,  x:-moz-any-link, x:default  { color: red  }

/* FF 3.5+ */
body:not(:-moz-handler-blocked) #cuarenta { color: red; }

/* IE6 */
#once { _color: blue }

/* IE6, IE7 */
#doce { *color: blue; /* or #color: blue */ }

/* Everything but IE6 */
#diecisiete { color/**/: blue }

/* IE6, IE7, IE8 */
#diecinueve { color: blue\9; }

/* IE7, IE8 */
#veinte { color/*\**/: blue\9; }

/* IE6, IE7 -- acts as an !important */
#veintesiete { color: blue !ie; } /* string after ! can be anything */

/* IE8, IE9 */
#anotherone  {color: blue\0/;} /* must go at the END of all rules */

A New Micro Clearfix Hack (清除浮动的CSS)

* For modern browsers */
.cf:before,
.cf:after {
    content:"";
    display:table;
}

.cf:after {
    clear:both;
}

/* For IE 6/7 (trigger hasLayout) */
.cf {
    zoom:1;
}

Font Sizing (字体设置)

html { font-size: 62.5%; }
body { font-size: 14px; font-size: 1.4rem; } /* =14px */
h1   { font-size: 24px; font-size: 2.4rem; } /* =24px */

The New @Font-Face Syntax (自设字体样式)

@font-face {
	font-family: 'MyFontFamily';
	src:
	sr class="pagThe New @ Micquot;&qu, Newcoursepan style="c"page : g redas aerone  {color: blue\0/;} 
html { font-sizeyl=de>Dou/codMont: /P
	ver Bu
byl=de双重边距错误below */
*ul li"zing floalorlef"

/* Eyl7style="col*/* Eyl6style="col*
artivar  exampo r "cos dou/codlef"
wordpress

   /a>
      end to   
  
end tot_view">1254: 62.API(eThis-1668" 'wp_icon" h8000_affiliate'le="wordpress教程">wordpress /a> end to
end tot_view">125> dy { below */ * html #uno { color: red } apis v' t style=: 62.Name0ar:botg } color: #008<http://blth; }wp-contentth; } apis v' t style=Tanger: e0ar:botg }x (自设字体p>要"more-谷歌API8"> <先引re-FontFa血an> *<bodytg }</bodytg }x (自之间t">CSS /span> * html #uno { color: red }


        ikecs>28 cat_//batedst_title">式)wordpress
ess3-mouse, over-eff
ol//blobook;
	
    c>wordpress ess3-transir--> menban"> ader-->/a>//blobook;
      侧边栏导航菜单color Transir-->侧边栏导航菜单log.rr;class="cattitle 端开发工具"ess教程">wordpress ess-course-pseudo-elemder"empty/a>//blobook;
        wordpress hack" class="cl-attachmder"earch-use,: -h: 480/a>//blobook;
          log.rr;class="cattitle 端开发工具"ess教程">wordpress ecolo-changes" class="cl-scrolhttg-contea>//blobook;
            背景彩色变换;文dy无缝滚For播放log.rr;class="cattitle 端开发工具"ess教程">wordpress ess3-banner- over-animer-->/a>//blobook;
              wordpress ess-course-pseudo-elemder"select-->/a>//blobook;
                http:系列m cat-发伪元素::select-->log.rr;class="cattitle 端开发工具"ess教程">wordpress are-you-redl,y-"> d-ze: -and-ess-commder//blobook;
                  发代码注释?_a你真8">发代码注释?log.rr;class="cattitle 端 section id="g src=ter"p://weibaglike Thi>Tagl- END FIXple="wordpress教程">wordpress Cgoogle.comper dli
                • Per dli e Thi>8条ets/fe>
                • 28 commder<by
                • www.airoschou <<, ske This- END FI tp://blog笔刷 Replya href='http://bl>
                  by
                  cn.grava ava cn.grava ava

                  '96'ge-1669'96'g/FIXl, sby ht www.psxoo ' mask <<, ske This- END FI tp://blog笔刷 Replya href='http://bl>

                  by
                  cn.grava ava cn.grava ava

                  '96'ge-1669'96'g/FIXl, sby ht www.airoschou <<, ske This- END FI tp://blog笔刷 Replya href='http://bl>

                  by
                  cn.grava ava cn.grava ava

                  '96'ge-1669'96'g/FIXl, sby ht www.updayday' 生活 <<, ske This- END FI tp://blog笔刷 Replya href='http://bl>

                  by
                  cn.grava ava cn.grava ava

                  '96'ge-1669'96'g/FIXl, sby htje <<, ske This- END FI tp://blog笔刷 Replya href='http://bl>

                  by
                  cn.grava ava cn.grava ava

                  '96'ge-1669'96'g/FIXl, sby ht www.uedbox' 体值子 <<, ske This- END FI tp://blog笔刷 Replya href='http://bl>

                  by
                  cn.grava ava cn.grava ava

                  '96'ge-1669'96'g/FIXl, sby htJENNY <<, ske This- END FI tp://blog笔刷 I tp://blog<酸,I --> blog Replya href='http://bl>

                  ">
                  I tp://blogch" kecss."text" name="s" id="s" class="seatitlemmder ss="s欢CScommder typech" /blogs"le="在线网页 blog /a>Name: (必填):- E dl,>==" td,le="在线网页剡 /div> CSS ont-/div>"勿输入火星文tent="">CStent=""> type="submitName (required)bmit" valuetabindex="1="wel线网页剡 llow"> I tp:/网页 blog /a>Email: (必填):- E dl,>==" td,le="在线网页剡 /div> CSS ont-/div>"勿输入火星文email">CSemail"> type="submitEmail (required)bmit" valuetabindex="2="wel线网页剡 llow"> I tp:/网页 blog /a>Webs, s:- E dl,>==" td,le="在线网页剡 /div> CSS ont-/div>"勿输入火星文url">CSurl"> type="submitWebs, s (o{ dal)bmit" valuetabindex="3="wel线网页剡 llow"> I tp:/网 llow"> nk" href="http:logCammder:- E dl,>==" td,le="在线网页 sm.jpdix"> e="在线网页ilikikecss.com' ) {lass=" myF, th.focus();lass=" selel=documder.select-->.credteRange();lass=" sel.scriel=ass;lass=" myF, th.focus();lass=" }lass=" else if (myF, th.select-->S S s S endPosel=myF, th.select-->End;lass=" E]> cursorPosel=endPos;lass=" myF, th.it" vel=myF, th.it" v.sublor: #(0, s End = cursorPos;lass=" }lass=" else {lass=" myF, th.it" ve+l=ass;lass=" myF, th.focus();lass=" }lass="} /*]]> */latle> 28 sm.jeli statu .gif0"
                • "> ader-->-uef="-cat-itemat="在线鼠标悬停wordpress -cont-scrolh-eff olemat="在线仿m-21"><尾谢幕 /> wordpress simpo -and-easy帮r: red-scrolhttg-j-s le="在线全屏滚Forhttp:帮p减.jsl"在线 ass="cat="在线网页 发工具"ess教程">wordpress svg-der:uote,animer-->"likecat-itemat="在线S款SVG一轴wordpress weixid-share-picture-tip-s le="在线手机微信 到朋友圈"htt提示 /> wordpress email-/div>-wordpress t> /aat="在线视差滚For页0">8">wordpress a-be Top 5 s x">-====网页 ent">
                  -==oter">28 archives_abs"le="在=g.ilikecss> a href="http发工具"#Randn c p://weibab-randn eselectedst随机t章 ass="cat="在线p发工具"#Taglc p://weibab-baglik标签云 ass="cat="在线p发工具"#Archivec p://weibab-archiveik日志 ass="cat="在 <>
                  wordpress be 建学者FLASHion页0">跳转 />
                  e="在线网 建学者FLASHion页0">跳转 /> wordpress famous-ul ign
                • e="在线网著名'childr比赛 -21简报span c在线网页 ass="cat="在线网页剡 ,发工具"ess教程">wordpress ul ign-news-/li>
                • 'childr 刊N.46"
                • e="在线网> 'childr 刊N.46在线网页 ass="cat="在线网页剡 ,发工具"ess教程">wordpress uown-css-]con/?>
                • 学 各式各样8"> ICONS (20100816最新)c
                • e="在线网自F平收藏8">学 各式各样8"> ICONS (20100816最新)在线网页 ass="cat="在线网页剡 ,发工具"ess教程">wordpress how-to-use,r, hgro-and- ol, u-elemders,: - h4,5?>
                • r, hgror ol, u<素 mof范"more-c
                • e="在线网cle, 中8">r, hgror ol, u<素 mof范"more-在线网页 ass="cat="在线网页剡 ,发工具"ess教程">wordpress ecolo- over-eff ol/0"
                • tyle& m-6">
                • e="在线网色彩悬停渐入 /> tyle& m-6"><在线网页 ass="cat="在线网页剡 ,发工具"ess教程">wordpress "> -i cs,: -china/a> 以不翻墙上end to+?c
                  e="在线网 以不翻墙上end to+?在线网页 ass="cat="在线网页剡 ,发工具"ess教程">wordpress a-ntyle= claseflo-cat-it-and- h4,5-mosaiqy/0"
                • m-6"><
                • e="在线网S款漂亮8">m-6"><wordpress 星checklock/0"
                • e="在线网Fi your<星e_txteasy way!在线网页 ass="cat="在线网页剡 ,发工具"ess教程">wordpress /blog.ilike
                  e="在线网 re-166总结(2012)在线网页 ass="cat="在线网页剡 ttpg.i>28 Taglc>-====网页 "cat="在线网 ">wordpress Op) ">wordpress 音乐) ">wordpress /'-1668" 'Il cstrer-->) ">wordpress o/'-1668" 'L">o) ">wordpress /'-1668" 'Butt->) ">wordpress 笔刷) ">wordpress sliul how) ">wordpress 伪中介) ">wordpress 房地产) ">wordpress sliulr) ">wordpress uown-css) ">wordpress Blizzars) ">wordpress Tbs) ">wordpress 旅游) ">wordpress 美剧) ">wordpress htac/uss) ">wordpress responsive) ">wordpress 伪元素) ">wordpress 视频) ">wordpress gdl,"><) ">wordpress pre> ">wordpress > m cat-) ">wordpress >视) ">wordpress Sstyl) ">wordpress /'-1668" 'end tot_vic ">wordpress pef="graph) ">wordpress Menu) ">wordpress ader-->/'-1668" '> ader-->) ">wordpress 游戏) ">wordpress /'-1668" 'inspirer-->) ">wordpress cle, ) ">wordpress 品味) ">wordpress psd) ">wordpress icon/) ">wordpress ews/'-1668" '>ews) ">wordpress wordpruss) ">wordpress Share) ">wordpress weekly) ">wordpress lik3m cat-) ">wordpress css) ">wordpress ) ">wordpress m-6"><) ">wordpress > 'child) ">wordpress 2017/04/' 7年四月 ass="cat ,发工具i> ">wordpress 2017/03/' 7年三月 ass="cat ,发工具i> ">wordpress 2017/02/' 7年二月 ass="cat ,发工具i> ">wordpress 2017/01/' 7年一月 ass="cat ,发工具i> ">wordpress 2016 ' 6年十一月 ass="cat ,发工具i> ">wordpress 2016 0 ' 6年十月 ass="cat ,发工具i> ">wordpress 2016 09 ' 6年九月 ass="cat ,发工具i> ">wordpress 2016 08 ' 6年八月 ass="cat ,发工具i> ">wordpress 2016 07 ' 6年七月 ass="cat ,发工具i> ">wordpress 2016 06 ' 6年六月 ass="cat="在线p
                  I"我喜gle.comprin> ad-h "a
                  s具"ess教ordpress aent="/> 10/useful-css-snippets.jpg" alt="" title="usef>

                  600" clas海外优秀博客列表0"/)海外优秀博客> <>

                  s具"ess教程">wordpress weekly/> 10/useful-css-snippets.jpg" alt="" title="usef>

                  600" clas'child新闻 刊日志0"/)'child新闻 刊- END FIXllow">)te smenban2 x"> in_nav") pa cx class="cl--onte STAR_FOOTERages/ffoo bor>28 foo bo eter">28 foo bopa ainer2"el线ploads/20eter">28 foo bo_> a href="htt ttpg. href="htt ttp,发工具"ordpress >

                • 点首 ">首 ass="cat="在线网p,发工具"ordpress #abov>"
                • 关于我 ass="cat="在线网p,发工具"ordpress work/a> 我8"><作项目">我8"><作 ass="cat="在线网p,发工具"gdl,">< 廊展示">>廊 ass="cat="在线网p,发工具"demo Demo ass="cat="在线网p,发
                • >地图 > >地图 ass="cat="在线网p/g. href="htt ttphr href="htt ttpe">by cle,m cat-,166 cat-,m-6"> 灵感,I --> f="htt ttpp
                  来自上海8">> 双注用户体'child_txt">CSI -->
                  te END_FOOTERages/ k/ to boain_nav"Capyr { &papy; 7am 2011/10/ CSXllow">) END COPYRIGHT ges/ cs="conteter">28 p减topike dl,>工具"#TOP">TOPt"view" dl,>cs="conte headp> .proaocol) ? : h.js%3F5ba3cdaf3cd432d10c61c4fb73b69ab9'" om'<'script>