標籤:hid focus 避免 代碼 filter sel 清除 :focus input
/*重設*/
*{margin:0;padding:0;font-family:"微軟雅黑";}
img { border:none;display:block;}
li{ list-style:none;}
a{text-decoration:none;display:block;outline:none;color:#555;}
select::-ms-expand {display: none;}
select {
border:none;
background:none;
/*很關鍵:將預設的select選擇框樣式清除*/
appearance:none;
-moz-appearance:none;
-webkit-appearance:none;
/*為下拉小箭頭留出一點位置,避免被文字覆蓋*/
padding-right: 14px;
}
input,textarea{border:none;background:none;}
input:focus,textarea:focus,select:focus{outline:none;}
input[type=text],textarea{
-moz-border-radius: 0; /* Firefox */
-webkit-border-radius: 0; /* Safari 和 Chrome */
border-radius: 0; /* Opera 10.5+, 以及使用了IE-CSS3的IE瀏覽器 */}
.clear:after{clear:both; content:‘.‘;display:block;width:0;height:0;visibility:hidden;}
.clear{zoom:1;}
.radius{
-moz-border-radius: 50%; /* Firefox */
-webkit-border-radius: 50%; /* Safari 和 Chrome */
border-radius: 50%; /* Opera 10.5+, 以及使用了IE-CSS3的IE瀏覽器 */}
.shadow{-moz-box-shadow: 10px 10px 20px #000; /* Firefox */
-webkit-box-shadow: 10px 10px 20px #000; /* Safari 和 Chrome */
box-shadow: 10px 10px 20px #000; /* Opera 10.5+, 以及使用了IE-CSS3的IE瀏覽器 */}
.tran{transition: all 1s;
-moz-transition: all 1s;
-webkit-transition: all 1s;
-o-transition: all 1s; }
/*前面添加*/
h3:before {
content: "";
display: inline-block;
width: 5px;
height: 5px;
background-color: #AF8C54;
-moz-border-radius: 50%; /* Firefox */
-webkit-border-radius: 50%; /* Safari 和 Chrome */
border-radius: 50%; /* Opera 10.5+, 以及使用了IE-CSS3的IE瀏覽器 */
margin:3px 10px 3px 0;
}
/*超出顯示省略符號*/
p{width:auto;height:30px;display:block;white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.cen{position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);}
/*透明度*/
.opa{opacity:0.8;filter:alpha(opacity=80);}
常用css代碼