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

  • 相关阅读:
    Redis学习笔记——环境搭建
    SQL 记录
    路径“D:svn.....”的访问被拒绝问题处理
    去除浏览器自动给input赋值的问题
    获取用户IP
    JS对身份证号码进行验证方法
    JS 实现倒计时
    SQL 游标
    .net上传图片实例
    生成唯一码
  • 原文地址:https://www.cnblogs.com/NightTiger/p/10259090.html
Copyright © 2011-2022 走看看