• reset.css文件下载及剖析


    @charset "utf-8";
    /* http://meyerweb.com/eric/tools/css/reset/
       v2.0-modified | 20110126
       License: none (public domain)
    */
    
    html, body, div, span, applet, object, iframe,
    h1, h2, h3, h4, h5, h6, p, blockquote, pre,
    a, abbr, acronym, address, big, cite, code,
    del, dfn, em, img, ins, kbd, q, s, samp,
    small, strike, strong, sub, sup, tt, var,
    b, u, i, center,
    dl, dt, dd, ol, ul, li,
    fieldset, form, label, legend,
    table, caption, tbody, tfoot, thead, tr, th, td,
    article, aside, canvas, details, embed,
    figure, figcaption, footer, header, hgroup,
    menu, nav, output, ruby, section, summary,
    time, mark, audio, video {
      margin: 0;
        padding: 0;
        border: 0;
        font-size: 100%;
        font: inherit;
        vertical-align: baseline;
    }
    
    /* make sure to set some focus styles for accessibility */
    :focus {
        outline: 0;
    }
    
    /* HTML5 display-role reset for older browsers */
    article, aside, details, figcaption, figure,
    footer, header, hgroup, menu, nav, section {
        display: block;
    }
    
    body {
        line-height: 1;
    }
    
    ol, ul {
        list-style: none;
    }
    
    blockquote, q {
        quotes: none;
    }
    
    blockquote:before, blockquote:after,
    q:before, q:after {
        content: '';
        content: none;
    }
    
    table {
        border-collapse: collapse;
        border-spacing: 0;
    }
    
    input[type=search]::-webkit-search-cancel-button,
    input[type=search]::-webkit-search-decoration,
    input[type=search]::-webkit-search-results-button,
    input[type=search]::-webkit-search-results-decoration {
        -webkit-appearance: none;
        -moz-appearance: none;
    }
    
    input[type=search] {
        -webkit-appearance: none;
        -moz-appearance: none;
        -webkit-box-sizing: content-box;
        -moz-box-sizing: content-box;
        box-sizing: content-box;
    }
    
    textarea {
        overflow: auto;
        vertical-align: top;
        resize: vertical;
    }
    
    /**
     * Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3.
     */
    
    audio,
    canvas,
    video {
        display: inline-block;
        *display: inline;
        *zoom: 1;
        max- 100%;
    }
    
    /**
     * Prevent modern browsers from displaying `audio` without controls.
     * Remove excess height in iOS 5 devices.
     */
    
    audio:not([controls]) {
        display: none;
        height: 0;
    }
    
    /**
     * Address styling not present in IE 7/8/9, Firefox 3, and Safari 4.
     * Known issue: no IE 6 support.
     */
    
    [hidden] {
        display: none;
    }
    
    /**
     * 1. Correct text resizing oddly in IE 6/7 when body `font-size` is set using
     *    `em` units.
     * 2. Prevent iOS text size adjust after orientation change, without disabling
     *    user zoom.
     */
    
    html {
        font-size: 100%; /* 1 */
        -webkit-text-size-adjust: 100%; /* 2 */
        -ms-text-size-adjust: 100%; /* 2 */
    }
    
    /**
     * Address `outline` inconsistency between Chrome and other browsers.
     */
    
    a:focus {
        outline: thin dotted;
    }
    
    /**
     * Improve readability when focused and also mouse hovered in all browsers.
     */
    
    a:active,
    a:hover {
        outline: 0;
    }
    
    /**
     * 1. Remove border when inside `a` element in IE 6/7/8/9 and Firefox 3.
     * 2. Improve image quality when scaled in IE 7.
     */
    
    img {
        border: 0; /* 1 */
        -ms-interpolation-mode: bicubic; /* 2 */
    }
    
    /**
     * Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11.
     */
    
    figure {
        margin: 0;
    }
    
    /**
     * Correct margin displayed oddly in IE 6/7.
     */
    
    form {
        margin: 0;
    }
    
    /**
     * Define consistent border, margin, and padding.
     */
    
    fieldset {
        border: 1px solid #c0c0c0;
        margin: 0 2px;
        padding: 0.35em 0.625em 0.75em;
    }
    
    /**
     * 1. Correct color not being inherited in IE 6/7/8/9.
     * 2. Correct text not wrapping in Firefox 3.
     * 3. Correct alignment displayed oddly in IE 6/7.
     */
    
    legend {
        border: 0; /* 1 */
        padding: 0;
        white-space: normal; /* 2 */
        *margin-left: -7px; /* 3 */
    }
    
    /**
     * 1. Correct font size not being inherited in all browsers.
     * 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5,
     *    and Chrome.
     * 3. Improve appearance and consistency in all browsers.
     */
    
    button,
    input,
    select,
    textarea {
        font-size: 100%; /* 1 */
        margin: 0; /* 2 */
        vertical-align: baseline; /* 3 */
        *vertical-align: middle; /* 3 */
    }
    
    /**
     * Address Firefox 3+ setting `line-height` on `input` using `!important` in
     * the UA stylesheet.
     */
    
    button,
    input {
        line-height: normal;
    }
    
    /**
     * Address inconsistent `text-transform` inheritance for `button` and `select`.
     * All other form control elements do not inherit `text-transform` values.
     * Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+.
     * Correct `select` style inheritance in Firefox 4+ and Opera.
     */
    
    button,
    select {
        text-transform: none;
    }
    
    /**
     * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
     *    and `video` controls.
     * 2. Correct inability to style clickable `input` types in iOS.
     * 3. Improve usability and consistency of cursor style between image-type
     *    `input` and others.
     * 4. Remove inner spacing in IE 7 without affecting normal text inputs.
     *    Known issue: inner spacing remains in IE 6.
     */
    
    button,
    html input[type="button"], /* 1 */
    input[type="reset"],
    input[type="submit"] {
        -webkit-appearance: button; /* 2 */
        cursor: pointer; /* 3 */
        *overflow: visible;  /* 4 */
    }
    
    /**
     * Re-set default cursor for disabled elements.
     */
    
    button[disabled],
    html input[disabled] {
        cursor: default;
    }
    
    /**
     * 1. Address box sizing set to content-box in IE 8/9.
     * 2. Remove excess padding in IE 8/9.
     * 3. Remove excess padding in IE 7.
     *    Known issue: excess padding remains in IE 6.
     */
    
    input[type="checkbox"],
    input[type="radio"] {
        box-sizing: border-box; /* 1 */
        padding: 0; /* 2 */
        *height: 13px; /* 3 */
        * 13px; /* 3 */
    }
    
    /**
     * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
     * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
     *    (include `-moz` to future-proof).
     */
    
    input[type="search"] {
        -webkit-appearance: textfield; /* 1 */
        -moz-box-sizing: content-box;
        -webkit-box-sizing: content-box; /* 2 */
        box-sizing: content-box;
    }
    
    /**
     * Remove inner padding and search cancel button in Safari 5 and Chrome
     * on OS X.
     */
    
    input[type="search"]::-webkit-search-cancel-button,
    input[type="search"]::-webkit-search-decoration {
        -webkit-appearance: none;
    }
    
    /**
     * Remove inner padding and border in Firefox 3+.
     */
    
    button::-moz-focus-inner,
    input::-moz-focus-inner {
        border: 0;
        padding: 0;
    }
    
    /**
     * 1. Remove default vertical scrollbar in IE 6/7/8/9.
     * 2. Improve readability and alignment in all browsers.
     */
    
    textarea {
        overflow: auto; /* 1 */
        vertical-align: top; /* 2 */
    }
    
    /**
     * Remove most spacing between table cells.
     */
    
    table {
        border-collapse: collapse;
        border-spacing: 0;
    }
    
    html,
    button,
    input,
    select,
    textarea {
        color: #222;
    }
    
    
    ::-moz-selection {
        background: #b3d4fc;
        text-shadow: none;
    }
    
    ::selection {
        background: #b3d4fc;
        text-shadow: none;
    }
    
    img {
        vertical-align: middle;
    }
    
    fieldset {
        border: 0;
        margin: 0;
        padding: 0;
    }
    
    textarea {
        resize: vertical;
    }
    
    .chromeframe {
        margin: 0.2em 0;
        background: #ccc;
        color: #000;
        padding: 0.2em 0;
    }
    /* 两者相+完整版 */
    /* 涉及到的H5新标签,之后课程做介绍 */
    html{
        color:#000;/*默认字体颜色黑色*/
        background:#fff;/*默认背景白色*/
        overflow-y:scroll;/*纵向滚动*/
        /*文本大小根据设备尺寸进行调整,取值auto自动、none不调整、percentage百分比*/
        -webkit-text-size-adjust:100%;/*用百分比来指定文本大小在设备尺寸不同的情况下如何调整*/
        -ms-text-size-adjust:100%;
        /*快速滚动和回弹的效果,允许独立的滚动区域和触摸回弹,WebKit私有的属性*/
        -webkit-overflow-scrolling:touch
    }
    /*
        -webkit-text-size-adjust: 100%; 
        解决的是chrome等以webkit为内核的浏览器下不支持小于12px的问题,在chrome下,缩小网页,其他元素缩小,但是字体大小不变的问题。   
        -ms-text-size-adjust: 100%;;解决IE的字体调整问题。
     */
    html *{
        outline:0;
        -webkit-text-size-adjust:none;
        /*
            当用户轻按一个链接或者JavaScript可点击元素时给元素覆盖一个高亮色。
            如果想取消这个高亮,将值设置为全透明即可,比如transparent
         */
        -webkit-tap-highlight-color:transparent;
    }
    /*
     拓展:
        (1)设置用户是否能够选中文本user-select
            取值:none:文本不能被选择;
                  text:可以选择文本
                  all:当所有内容作为一个整体时可以被选择。如果双击或者在上下文上点击子元素,
                         那么被选择的部分将是以该子元素向上回溯的最高祖先元素。
                  element:可以选择文本,但选择范围受元素边界的约束
        
    
    */
    body,html{
        font-family:"Microsoft YaHei",sans-serif,Tahoma,Arial;
        /*字体系列:Microsoft YaHei微软雅黑,sans-serif无衬线,Tahoma无衬线字体之大河马字体、Arial无衬线体TrueType字型字体*/
    }
    article,aside,blockquote,body,button,code,dd,details,div,dl,
    dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,
    hgroup,hr,input,legend,li,menu,nav,ol,p,pre,section,td,textarea,th,ul{
        margin:0;
        padding:0;
        -webkit-box-sizing:border-box;
        -moz-box-sizing:border-box;
        box-sizing:border-box
    }
    /*
        使用了html5标签。IE9一下的浏览器将不支持这些标签元素
        比如<header;><article;><footer;><figure;>等等。包含 html5.js 文件将会是这些浏览器明白这些新元素。
     */
    article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{
        display:block
    }
    input,input[type=button],input[type=reset],input[type=submit]{
        resize:none;
        border:none;
        /* 
            appearance允许使元素看上去像标准的用户界面元素
            appearance: normal常规元素|icon图标(小图片)|window视口|button按钮|menu呈现为一套供用户选择的选项|field呈现为输入字段; 
        */
        /*
            border-radius兼容iPhone的时候会出现和安卓不一样的效果,小圆角变成半圆角
            这个时候只需要给该元素添加css ,-webkit-appearance:none;即可解决兼容问题
         */
        -webkit-appearance:none;/*解决iPhone圆角问题*/
        border-radius:0;/*解决iPhone圆角问题*/
    }
    input,select,textarea{
        /* 
            有的元素不会继承根元素字体大小,所以在移动端开发时常设置如下情况
            重设浏览器默认字体大小h1,h2,h3,h4,h5,h6 {font-size:100%;font-weight:normal;}
            因为假如你设置body{font-size:12px;},但h1是不会继承这个12px,它会按照一定百分比增加字号,
            但如果给h1显示指定font-size:100%;它就会继承body设定的字体大小,所以它改变了默认的大小
        */
        /* font-size在IE7-设置px不具有继承性,设置%是为了把 font-size 设置为基于父元素的一个百分比值 */
        font-size:100%
    }
    table{
        /*表格设置合并边框*/
        border-collapse:collapse;
        /*单元格间隙合并*/
        border-spacing:0
    }
    fieldset,img{
        border:0
    }
    abbr,acronym{
        border:0;
        /* 
            设置小型大写字母的字体显示文本,这意味着所有的小写字母均会被转换为大写,
            但是所有使用小型大写字体的字母与其余文本相比,其字体尺寸更小。
            normal:默认值。浏览器会显示一个标准的字体;
            small-caps:浏览器会显示小型大写字母的字体;
            inherit:规定应该从父元素继承 font-variant 属性的值
        */
        font-variant:normal
    }
    /*设置删除线*/
    del{
        text-decoration:line-through
    }
    address,caption,cite,code,dfn,em,th,var{
        /*
            font-style 属性定义字体的风格
            normal:默认值。浏览器显示一个标准的字体样式。
            italic:浏览器会显示一个斜体的字体样式。
            oblique:浏览器会显示一个倾斜的字体样式。
            inherit:规定应该从父元素继承字体样式
         */
        font-style:normal;
        font-weight:500
    }
    /*去除列表标记*/
    ol,ul{
        list-style:none;
    }
    
    
    
    
    caption,th{
        text-align:left/*文字左对齐*/
    }
    h1,h2,h3,h4,h5,h6{
        font-size:100%;/*字体100%继承父级*/
        font-weight:500/*字体加粗*/
    }
    q:after,q:before{
        content:'';/*就是引用,在<q></q>标签之间的文字两头加上引号(")*/
    
        /*<q> 标签定义短的引用。*/
        /*如代码:<q>替代文字替代文字替代文字替代文字</q>*/
        /*效果为:"替代文字替代文字替代文字替代文字"*/
    
    /*拓展*/
        /*<q> 标签在本质上与 <blockquote> 是一样的。不同之处在于它们的显示和应用。
        <q> 标签用于简短的行内引用。
        如果需要从周围内容分离出来比较长的部分(通常显示为缩进的块),请使用 <blockquote> 标签。*/
    }
    
    
    /*sub标签可定义下标文本,sup标签可定义上标文本。*/
    
    /*提示:
        无论是 <sub> 标签还是和它对应的 <sup> 标签,在数学等式、科学符号和化学公式中都非常有用。
        <sup> 标签在向文档添加脚注以及表示方程式中的指数值时非常有用。
        如果和 <a> 标签结合起来使用,就可以创建出很好的超链接脚注。
    */
    sub,sup{
        font-size:75%;/*字体75%继承父级*/
        line-height:0;/*行高为0*/
        position:relative;/*绝对定位*/
        vertical-align:baseline;/*设置元素的垂直对齐方式。----默认值:baseline*/
    }
    sup{
        top:-.5em;
    }
    sub{
        bottom:-.25em;
    }
    a:hover{
        text-decoration:underline;/*划过a链接出现下划线*/
    }
    a,ins{
        /*<ins>标签定义已经被插入文档中的文本。*/
        text-decoration:none;/*删除下划线*/
    }
    a:active,a:hover,a:link,a:visited{
        /*active:鼠标按下还未释放时的样子*/
        /*hover:鼠标经过时的链接效果*/
        /*link:未访问的链接*/
        /*visited:已访问的链接*/
        background:0 0;/*默认值*/
        -webkit-tap-highlight-color:transparent;
        /*这个属性只用于iOS (iPhone和iPad)。当你点击一个链接或者通过Javascript定义的可点击元素的时候,
        它就会出现一个半透明的灰色背景。要重设这个表现,你可以设置-webkit-tap-highlight-color为任何颜色。
        想要禁用这个高亮,设置颜色的alpha值为0即可。*/
        -webkit-tap-highlight-color:transparent;
        
        outline:0;
        /*outline (轮廓)是绘制于元素周围的一条线,位于边框边缘的外围,可起到突出元素的作用。*/
    
        text-decoration:none;/*删除下划线*/
    }

    .

  • 相关阅读:
    IIS 解决问题:HTTP 错误 401.1
    Mvc
    如何将word公式粘贴到UMEditor里面
    SpringCloud上传大文件并支持中途取消上传
    SpringBoot上传大文件并支持中途取消上传
    SpringMVC上传大文件并支持中途取消上传
    csharp上传大文件并支持中途取消上传
    c#上传大文件并支持中途取消上传
    .net上传大文件并支持中途取消上传
    c#.net上传大文件并支持中途取消上传
  • 原文地址:https://www.cnblogs.com/fightjianxian/p/11917912.html
Copyright © 2020-2023  润新知