~~~
* {-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-touch-callout: none;
list-style: none;
margin: 0px;
padding: 0px;
}
html,body {
font-size: 20px;
height:100%;
font-family: sans-serif;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
@media only screen and (min-width: 320px) {
html {
font-size: 19px !important;
}
}
@media only screen and (min-width: 400px) {
html {
font-size: 21.33333333px !important;
}
}
@media only screen and (min-width: 414px) {
html {
font-size: 22.08px !important;
}
}
@media only screen and (min-width: 480px) {
html {
font-size: 25.6px !important;
}
}
article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary {
display: block;
}
audio,canvas,progress,video {
display: inline-block;
vertical-align: baseline;
}
a {
background-color: transparent;
}
a:active, a:hover {
outline: 0;
}
abbr[title] {
border-bottom: 1px dotted;
}
img {
border: 0;
}
svg:not(:root) {
overflow: hidden;
}
figure {
margin: 1em 40px;
}
code,kbd,pre,samp {
font-family: monospace, monospace;
font-size: 1em;
}
button,input,optgroup,select,textarea {
font: inherit;
color: inherit;
outline: none;
}
button {
overflow: visible;
}
button,select {
text-transform: none;
}
button,html input[type="button"],input[type="reset"],input[type="submit"] {
-webkit-appearance: button;
cursor: pointer;
}
button[disabled],html input[disabled] {
cursor: default;
}
button::-moz-focus-inner,input::-moz-focus-inner {
padding: 0;
border: 0;
}
input {
line-height: normal;
}
input[type="checkbox"],input[type="radio"] {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button {
height: auto;
}
input[type="search"] {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
-webkit-appearance: textfield;
}
input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
table {
border-spacing: 0;
border-collapse: collapse;
}
~~~
- 代碼片段
- 1.格式化銀行卡
- 2.將HTML內容保存為圖片
- 3.mui代碼片段
- 1.粘貼內容
- 2.禁止tab左右滑動
- 3.判斷網絡狀態
- 4.將圖片壓縮轉換為base64
- 5.雙擊退出應用
- 6.二維碼掃描
- 7.支持豎屏
- 4.時間戳格式化
- 5.字符串操作
- 1.去除字符串中的空格
- 2.計算字符串的長度
- 3.字符串轉化
- 4. 復制字符串
- 5.替換字符串
- 6.字符串替換為 *
- 7.字符串檢測
- 8 .生成字符串
- 9.檢測一個字符在字符串中出現的次數
- 6.檢測密碼的等級強度
- 7.數組操作
- 1.數組去重函數
- 2.打亂數組的順序
- 3.求數組的最大值和最小值
- 4.求一個數組的和 基于數字數組
- 5.求一個數組的平均數 基于數字數組
- 6. 隨機獲取數組中的一個元素
- 7.獲取一個字符在一個字符串中出現的次數
- 8.截取數組長度
- 9.刪除值為'val'的數組元素
- 8.cookie操作
- 9.格式化對象 清除對象中的空和null
- 10. 將數組的人民幣轉換為大寫
- 11.URL操作
- 12.返回兩個數之間的隨機數
- 13.隨機產生顏色值
- 14.獲取到截止時間的時間
- 15.文件類型檢測
- 16.判斷是否是安卓或蘋果
- 17.給文字加下劃線
- 源碼分析
- jQuery 1.2.6 源碼閱讀解讀
- webpack插件總結
- css雜記
- css樣式初始化
- JavaScript深入
- 1.JavaScript深入之從原型到原型鏈
- 2.JavaScript深入之詞法作用域和動態作用域
- 3.JavaScript深入之執行上下文棧