zoukankan      html  css  js  c++  java
  • CSS样式重置

    作者声明:本博客中所写的文章,都是博主自学过程的笔记,参考了很多的学习资料,学习资料和笔记会注明出处,所有的内容都以交流学习为主。有不正确的地方,欢迎批评指正

    CSS样式重置

    常用的样式重置代码

      

    @charset "UTF-8";
    html,
    body {
      background: #f0f0f0;
      color: #505050;
      /* 不允许选中 */
      -webkit-user-select: none;
      user-select: none;
      /* 去掉默认点击高亮显示 */
      -webkit-tap-highlight-color: transparent;
      /*禁止长按链接与图片弹出菜单*/
      -webkit-touch-callout: none;
      /*滚动平滑,另外有反弹的效果。*/
      -webkit-overflow-scrolling: touch; }
    
    body,
    button,
    input,
    select,
    textarea {
      font: 14px/1.5 "5b8b4f53", "Helvetica Neue", Arial, "Liberation Sans", FreeSans, "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
      line-height: 20px; }
    
    html,
    body,
    div,
    p,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    ul,
    ol,
    li,
    dl,
    dt,
    dd,
    pre,
    code,
    form,
    fieldset,
    legend,
    input,
    textarea,
    blockquote,
    th,
    td,
    hr,
    button,
    article,
    aside,
    details,
    figcaption,
    figure,
    footer,
    header,
    hgroup,
    menu,
    nav,
    section {
      padding: 0;
      margin: 0; }
    
    ul,
    ol {
      list-style: none; }
    
    html,
    body,
    form,
    fieldset,
    p,
    div,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
      /*阻止旋转屏幕时自动调整字体大小*/
      -webkit-text-size-adjust: none; }
    
    table {
      border-collapse: collapse;
      border-spacing: 0; }
    
    image,
    fieldset {
      border: none; }
    
    a:focus,
    *:focus {
      outline: none; }
    
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
      font-weight: normal; }
    
    /*取消按钮在inphone上的默认样式*/
    input[type=button] {
      -webkit-appearance: none;
      outline: none; }
    
    input::-webkit-input-placeholder {
      /*修改webkit中input的planceholder样式*/
      color: #969; }
    
    textarea::-webkit-input-placeholder {
      /*修改webkit中input的planceholder样式*/
      color: #969; }
    
    input:focus::-webkit-input-placeholder {
      color: #969; }
    
    input::-webkit-input-speech-button {
      display: none; }
    
    a, button, input, optgroup, select, textarea {
      /*去掉a、input和button点击时的蓝色外边框和灰色半透明背景*/
      -webkit-tap-highlight-color: transparent;
      color: inherit; }
    
    a {
      text-decoration: none; }
    
    .overflow-txt {
      white-space: nowrap;
      text-overflow: ellipsis; }
    
    .fl {
      float: left; }
    
    .fr {
      float: right; }
    
    .clearfix:before, .clearfix:after {
      display: table;
      content: " ";
      height: 0;
      font-size: 0;
      line-height: 0; }
    
    .clearfix:after {
      clear: both; }
    
    .block {
      padding: 0;
      margin: 0;
      display: block; }
    
    .layer-sep {
      height: 10px;
      background-color: #eee; }

    其他常见的样式重置方式

    https://www.cnblogs.com/staven/p/4818459.html

  • 相关阅读:
    [ZJOI2006]书架
    luogu P3369 【模板】普通平衡树(splay)
    MegaCli是一款管理维护硬件RAID软件,可以通过它来了解当前raid卡的所有信息,包括 raid卡的型号,raid的阵列类型,raid 上各磁盘状态
    ipmi配置方法-20200328
    debian配置---->/etc/apt/sources.list apt基本源设置指南
    Alien 魔法:RPM 和 DEB 互转
    Debian 9 中设置网络
    SSH自动断开连接的原因-20200323
    mpstat命令
    dstat命令
  • 原文地址:https://www.cnblogs.com/NightTiger/p/10259090.html
Copyright © 2011-2022 走看看