常用css代碼

來源:互聯網
上載者:User

標籤: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代碼

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.