zoukankan      html  css  js  c++  java
  • 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;
    }
    

      

  • 相关阅读:
    爬虫-基于scrapy-redis两种形式的分布式爬虫
    爬虫-Scrapy框架(CrawlSpider)
    爬虫-User-Agent和代理池
    爬虫-scrapy框架之递归解析和post请求
    爬虫-scrapy数据的持久化存储
    爬虫-scrapy框架简介和基础应用
    爬虫-移动端数据爬取
    爬虫-图片懒加载技术、selenium和PhantomJS
    爬虫-验证码处理
    爬虫-requests模块
  • 原文地址:https://www.cnblogs.com/detanx/p/cssReset.html
Copyright © 2011-2022 走看看