• css 清除一些默认的设置


    一、input标签的placeholder的设置

    input::-webkit-input-placeholder{ /*WebKit browsers*/
      //重置样式
    }
      
    input::-moz-input-placeholder{ /*Mozilla Firefox*/
      //重置样式
    }
    
    input::-ms-input-placeholder{ /*Internet Explorer*/ 
      //重置样式
    }
    

      
    二、input标签的获得焦点的边框设置

    //在input的css中加
    outline:none 
    或 
    outline:medium;
    
    input{ outline:medium;}
     /*获取焦点*/
    input:focus{ 
      border: 1px dolid #EEE;
     }
    

      
    三、去掉列表的默认样式

    li {
    	list-style-type: none;
    }
    ol, ul {
    	list-style: none;
    }
    

      
    四、自己所用的css reset

    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-family: "微软雅黑";
    	font-size: 100%;
    	font: inherit;
    	vertical-align: baseline;
    }
    
    h1, h2, h3, h4, h5, h6 {
    	font-weight: bold;
    }
    
    fieldset {
    	margin: 60px 0;
    	text-align: center;
    	border-top: 2px solid #61CDE7;
    }
    
    legend {
    	padding: 0 80px;
    	font-size: 22px;
    	color: #61CDE7;    
    }
    
    a {
    	text-decoration: none;
    }
    
    a:hover {
    	cursor: pointer;
    }
    
    .fl {
    	float: left;
    }
    
    .fr {
    	float: right;
    }
    
    button {
    	border: none;
    }
    /* 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;
    }
    
    .clearfix:after {
      visibility: hidden;
      display: block;
      font-size: 0;
      content: " ";
      clear: both;
      height: 0;
    }
    

      

  • 相关阅读:
    LINQ表达式预备讲课
    开发中必须安装的软件
    jquery判断单选按钮radio是否选中的方法
    JQuery判断radio(单选框)是否选中和获取选中值方法总结
    jquery $.each 和for怎么跳出循环终止本次循环
    ECharts 3.0 初学感想及学习中遇到的瓶颈
    js 日期时间大小比较
    Vue资料-简介-旋之华
    vue 引用 vue-resource步骤 (遇错排解)
    vue-resource和axios的简单使用方法总结
  • 原文地址:https://www.cnblogs.com/detanx/p/cssReset.html
Copyright © 2020-2023  润新知