2015年10月25日 星期日

[ CSS ] 常用的CSS

-webkit-transform: rotate(傾斜角度);
-moz-transform: rotate(傾斜角度);
-o-transform: rotate(傾斜角度);
-ms-transform:rotate(傾斜角度)



/* 透明度 */
  opacity: 0.5;
  -moz-opacity: 0.5;
  -webkit-opacity: 0.5;
  -khtml-opacity: 0.5;
  filter:alpha(opacity=50);

  -moz-transition: all 0.5s;
  -webkit-transition: all 0.5s;
  -o-transition: all 0.5s;
  -ms-transition: all 0.5s;
  transition: all 0.5s;

/*CSS3圖片滑過放大*/
<div class="box">
  <a href="#" title="" class="zoom"><img src="images/01.jpg" alt="" /></a>
</div>
a.zoom { width: 200px; overflow: hidden; height: 200px; border: 1px solid #ccc; margin: 5px; display: inline-block; }
a.zoom img { transition: all .2s linear; vertical-align: bottom; }
a.zoom img:hover { transform: scale(1.5); }

/* css圓角 */
/* support Safari, Chrome */
-webkit-border-radius: 5px;
/* support firefox */
-moz-border-radius: 5px;
border-radius: 5px;


/* 區塊陰影 */
-moz-box-shadow: inset 2px 2px 4px rgba(0,0,0,.65);
-webkit-box-shadow: inset 2px 2px 4px rgba(0,0,0,.65);
box-shadow: inset 2px 2px 4px rgba(0,0,0,.65);
inset:用來設定內陰影,選擇性項目,無填寫代表呈現為外陰影。
offset-x:x 軸方向的陰影大小,單位為長度單位,如 em、px 等。
offset-y:y 軸方向的陰影大小,單位為長度單位,如 em、px 等。
blur-radius:模糊半徑,選擇性項目,未填寫則為預設值零。
spread-radius:擴散半徑,選擇性項目,未填寫則為預設值零。
陰影顏色:必要項目,自行決定陰影的顏色。

/* 文字陰影 */
-moz-text-shadow: 0 2px 2px #fff;
-webkit-text-shadow: 0 2px 2px #fff;
text-shadow: 0 2px 2px #fff;

/* 反白樣式 */
::selection {background:#fe57a1;color:#fff;text-shadow:none;}
::selection {background: #336699; color: #fff; text-shadow: none;}

/* 去除連結虛線框 */
a{ outline: none; /* for Firefox */ hlbr:expression(this.onFocus=this.blur()); /* for IE */}

/* 中文文字對齊,CSS justify */
text-align: justify; text-justify: inter-ideograph;