css初始化重設

來源:互聯網
上載者:User

標籤:ted   css   捲軸   ado   author   auto   hidden   cal   ber   

在網上找了很久,有結合自己做的

@charset ‘UTF-8‘;/*    document   : css初始化 重複class類    Created on : 2017-07-13    Author     :     Description:                css樣式表的初始化,全域樣式設定 */html,body,div,ul,ol,li,p,a,i,em,img,form,input,textarea,h1,h2,h3,h4,h5,h6,::before,::after {    margin: 0;    padding: 0;    -webkit-top-height-color: transparent;/* 點擊高亮透明 */    -webkit-text-size-adjust:none; /* 阻止旋轉螢幕時自動調整字型大小 */    -webkit-box-sizing: border-box;       -moz-box-sizing: border-box;            box-sizing: border-box;}body {    color: #000;    font: 12px/1.4 ‘Microsoft YaHei‘,Arial,sans-serif;    background-color: #fff;    overflow-x: hidden;    /* 解決上下拉動捲軸時卡頓,慢 */    -webkit-overflow-scrolling: touch;       -moz-overflow-scrolling: touch;            overflow-scrolling: touch;}a {    text-decoration: none;    color: #000;    background-color: transparent;}ol,ul {    list-style-type: none;}img {    border: 0;    vertical-align: middle;}p {    word-wrap: break-word;}em {    font-style: normal;}input,button,select,textarea {    resize: none;/* 禁止textarea展開 */    outline: none;    -webkit-appearance: none;/* 解決iphone及ipad下輸入框預設內陰影 */    line-height: normal;/* 解決placeholder在移動端偏上問題 */    -webkit-transform: translate3d(0,0,0);/* 解決低版本事件無法觸發 */    font-family: inherit;    font-size: inherit;    line-height: inherit;    border: 1px solid #ccc;    padding: 1px;}input[type=text]:focus {    border: 1px solid #ccc;}h1,h2,h3,h4,h5,h6 {    font-size: 100%;    font-weight: normal;}/* 清除浮動 */.clearfix:before,.clearfix:after {    content: ‘‘;    display: block;    height: 0;    line-height: 0;    visibility: hidden;    clear: both;}/* 解決Input type = number 錯亂問題 */input[type=number]::-webkit-inner-spin-button,  input[type=number]::-webkit-outer-spin-button {     margin: 0;    -webkit-appearance: none;       -moz-appearance: none;             appearance: none;    }/* 針對於bootstap重設 */a:focus,a:hover {    color: #000;    text-decoration: none;}/* 重複使用 */.layout {    position: relative;}.container-fluid {    padding-right: 15px;    padding-left: 15px;    margin-right: auto;    margin-left: auto;}.w {    display: block;    width: 100%;}.w75 {    width: 75%;}.w50 {    width: 50%;}.w33{    width: 33.333333%;}.w25{    width: 25%;}.h {    display: block;    height: 100%;}.wh {    display: block;    width: 100%;    height: 100%}ul.block { /* 解決ul沒有高 */    overflow: hidden;}.omit { /* 單行省略 */    overflow: hidden;    text-overflow: ellipsis;    white-space:nowrap;}/* 多行省略 */.more_omit {    display: -webkit-box;    overflow: hidden;    text-overflow: ellipsis;    -webkit-box-orient: vertical;    -webkit-line-clamp: 3; /* 顯示幾行寫幾 */}.left {    float: left;}.right {    float: right;}.center {    margin-left: auto;    margin-right: auto;}/* CSS樣式小箭頭 */.arrow {    padding: 20px;}.arrow i {    display: inline-block;    width: 0;    height: 0;    border-width: 8px;}.arrow_top {    border-color: transparent transparent #000 transparent; /* 向上箭頭 */    border-style: solid;}.arrow_right {    border-color: transparent transparent transparent #000; /* 向右箭頭 */    border-style: solid;}.arrow_bottom {    border-color: #000 transparent transparent transparent; /* 向下箭頭 */    border-style: solid;}.arrow_left {    border-color: transparent #000 transparent transparent; /* 向左箭頭 */    border-style: solid;}/* 四周陰影 */.box_shadow {    box-shadow: 0 0 10px #dedede;    border: 1px solid #dedede;}

 

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.