基本css说明

时间:2023-03-10 06:18:47
基本css说明

/*-moz代表firefox浏览器私有属性 2、-ms代表ie浏览器私有属性 3、-webkit代表safari、chrome私有属性*/

body, dl, dd, ul, ol, h1, h2, h3, h4, h5, h6, pre, form, input, textarea, p, hr, thead, tbody, tfoot, th, td {             margin: 0;             padding: 0;         }

ul, ol {             list-style: none; /*去掉列表的前缀*/         }

a {             text-decoration: none; /*文本的修饰(下划线)*/             color: #555;         }

html {             -ms-text-size-adjust: none; /*缩放字体不调整*/             -webkit-text-size-adjust: none; /*取消浏览器最小字体限制*/             text-size-adjust: none; /*缩放字体不调整*/         }

body {             line-height: 1.5 /*1.5倍行高*/         }

body, button, input, select, textarea {             font-family: 'helvetica neue',tahoma,'hiragino sans gb',stheiti,'wenquanyi micro hei',\5FAE\8F6F\96C5\9ED1,\5B8B\4F53,sans-serif; /*字体列表*/         }

b, strong {             font-weight: bold; /*字体粗细*/         }

i, em {             font-style: normal; /*正常字体*/         }

table {             border-collapse: collapse; /*table边框合并*/             border-spacing: 0; /*间距*/         }

table th, table td {                 border: 1px solid #ddd;                 padding: 5px;             }

table th {                 font-weight: inherit;                 border-bottom-width: 2px;                 border-bottom-color: #ccc;             }

img {             border: 0 none;             width: auto\9;             max-width: 100%;             vertical-align: top;             height: auto;         }

button, input, select, textarea {             font-family: inherit;             font-size: 100%;             margin: 0;             vertical-align: baseline;         }

button, html input[type="button"], input[type="reset"], input[type="submit"] {                 -webkit-appearance: button; /*将上述按钮样式规定为指定样式可以为none即清空*/                 cursor: pointer; /*鼠标指针为手指*/             }

button[disabled], input[disabled] {                     cursor: default; /*鼠标为正常*/                 }

input[type="checkbox"], input[type="radio"] {                 box-sizing: border-box; /*设置的边框和内边距的值是包含在width内*/                 padding: 0;             }

input[type="search"] {                 -webkit-appearance: textfield; /*改变其外观为textfield风格*/                 -moz-box-sizing: content-box;                 -webkit-box-sizing: content-box;                 box-sizing: content-box; /*padding和border不被包含在定义的width和height之内*/             }

input[type="search"]::-webkit-search-decoration {                     -webkit-appearance: none; /*去除默认样式*/                 }

input:focus {                 outline: none; /*当聚焦input标签的时候,在input标签的区域周围会有一个虚线的框,这个框不同于border的是,它是不占有任何宽度的。当你取消焦点的时候,这个虚线框就会自然消失*/             }

select[size], select[multiple], select[size][multiple] {                 border: 1px solid #AAA;                 padding: 0;             }

article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary {             display: block; /*此元素将显示为块级元素,此元素前后会带有换行符*/         }

audio, canvas, video, progress {             display: inline-block; /*行内块元素*/         }

body {             background: #fff; /*白色*/         }

input::-webkit-input-speech-button {             display: none /*不显示*/         }

button, input, textarea {             -webkit-tap-highlight-color: rgba(0,0,0,0);         }

html, body {
height: 100%;/*高度设为100%背景色填充*/
}