|
Here is the list of 10 hand picked CSS hacks and tricks which can help you in your CSS code and also save some time.
1. Vertical align div (垂直居中)
http://stylizedweb.com/2008/02/01/vertical-align-div/
2. Min-Height (最小高度)
selector {
min-height:500px;
height:auto; !important
height:500px;
}
3. PNG transparency (透明png)
http://stylizedweb.com/2007/12/30/png-transparency-issues/
4. Autoclear (自動清除)
.container:after {
content: “.”;
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.container {display: inline-table;}
/* Hides from IE-mac /*/
* html .container {height: 1%;}
.container {display: block;}
/* End hide from IE-mac */
5. Reset CSS (CSS重設)
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,
fieldset,input,p,blockquote,th,td {
margin:0; padding:0;
}
table {border-collapse:collapse;border-spacing:0;}
fieldset,img {border:0;}
address,caption,cite,code,dfn,em,strong,th,var {
font-style:normal;font-weight:normal;
}
ol,ul {list-style:none;}
caption,th {text-align:left;}
h1,h2,h3,h4,h5,h6 {font-size:100%;}
q:before,q:after {content:”;}
6. Scrolling Render IE (IE滾動條渲染)
html {
background : url(null) fixed no-repeat;
}
7. Opacity (透明度)
#transdiv {
filter:alpha(opacity=75);
-moz-opacity:.75;
opacity:.75;
}
8. PRE Tag (標簽預格式)
pre {
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* InterNET Explorer 5.5+ */
}
9. Li Background Repeat IE (LI標簽背景重復)
<! 主站蜘蛛池模板: 电影终结者| 画魂 电影| 不得不爱吉他谱| alura jenson movies| 美女的内裤| 巴厘岛旅游攻略| 火火| 炊事班的故事演员名单| 猫小帅睡前故事| 夏希粟| 洛可希佛帝| 烽火流金电视剧全集免费观看| 太太的情人 电影| 少年派2全集免费播放| 十一码复式22块钱中奖对照表| 黄金传说| 欧美video丝袜连裤袜| 捷克女人性ⅹxxxx视频| 保镖1983| 成人免费视频观看视频| 欠条怎么写才具有法律作用| 女孩们的周末| 人民的名义电视剧免费版| 鬼整人| 植树看图写话| 布莱克·莱弗利身高体重| 电影因果报应完整版观看| 电影《此时此刻》| 安微地图| 妈妈1| 故都的秋ppt| 权威的图片| 廖凡主演的电视剧有哪些| 二年级上古诗26首打印| 成人一级片视频| 美丽的坏女人中文字幕| 内蒙古电视台| 隐藏的真相| 我爱我爹全集高清版免费观看| 傅首尔个人资料| 草原大作战|