首页 > 其他分享 >css样式重置

css样式重置

时间:2022-11-12 20:45:41浏览次数:46  
标签:none 样式 重置 color 125 webkit font border css

/**
 * Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/)
 * http://cssreset.com
 */
 
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;
  font-weight: normal;
  vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section{
  display: block;
}
ol, ul, li{
  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;
}
 
/* custom */
a{
  color: #7e8c8d;
  text-decoration: none;
  -webkit-backface-visibility: hidden;
}
::-webkit-scrollbar{
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track-piece{
  background-color: rgba(0, 0, 0, 0.2);
  -webkit-border-radius: 6px;
}
::-webkit-scrollbar-thumb:vertical{
  height: 5px;
  background-color: rgba(125, 125, 125, 0.7);
  -webkit-border-radius: 6px;
}
::-webkit-scrollbar-thumb:horizontal{
  width: 5px;
  background-color: rgba(125, 125, 125, 0.7);
  -webkit-border-radius: 6px;
}
html, body{
  width: 100%;
  font-family: "Arial", "Microsoft YaHei", "黑体", "宋体", "微软雅黑", sans-serif;
}
body{
  line-height: 1;
  -webkit-text-size-adjust: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
html{
  overflow-y: scroll;
}
 
/*清除浮动*/
.clearfix:before,
.clearfix:after{
  content: " ";
  display: inline-block;
  height: 0;
  clear: both;
  visibility: hidden;
}
.clearfix{
  *zoom: 1;
}
 
/*隐藏*/
.dn{
  display: none;
}

标签:none,样式,重置,color,125,webkit,font,border,css
From: https://www.cnblogs.com/en-xiao/p/16884600.html

相关文章

  • css媒体查询边界值是否包含?
    答案:对于min-width,max-width 这种,是左右边界值都包含的。如果下一个写的媒体查询的区间包含了上一个的区间,以后写的为准,覆盖前一个,所以顺序也会影响媒体查询。例如......
  • 基于CSS mask和clip-path实现切角的技巧
    本文翻译自TrickstoCutCornersUsingCSSMaskandClip-PathProperties,略有删改原作者:TemaniAfif我们最近使用CSSmask属性创建花哨的边框,本文将使用CSSmask和c......
  • CSS布局
    1.继承性(谁选中的范围越广,谁的优先级越底) 2.权重的计算   4.盒子模型(使用软件PxCook)   5.盒子模型(盒子的组成,边框,内边距,外边距的设置方法)   ......
  • 动态插入样式
    //varsheet=(function(){//varstyle=document.createElement("style");//style.appendChild(document.createTextNode(''));//docu......
  • CSS弹性盒
    一、怪异盒模型含义:更改原有布局盒子模型的计算方式通过box-sizing属性的取值进行更改属性:box-sizing box-sizing属性允许您以特定的方式定义匹配某个区域的特定元素......
  • 原生 HTML + CSS + JavaScript 写时钟
    时钟效果目录结构HTML代码<!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><metahttp-equiv="X-UA-Compatible"content="IE=edge">......
  • 涨姿势了,这 4 个场景可用 CSS 完全取代 JS ~
    本篇通译自:​​#It’s2022.SometimesYouDon’tNeedJavascriptatAll​​1.颜色选择器我们通常需要通过复杂的JavaScript来实现一个类似下图的颜色选择器组件。好......
  • ODOO前端引用css如何修改页面属性
    odoo前端存在一些样式不合理的地方,如何通过ccs修改页面属性:1 通过页面属性class;2 新建模块后,创建static/src/css/styles.css文件  3 style.css内容十分简单,设......
  • CSS Sticky Footer实现
    什么是StickyFooter?StickyFooter(粘黏页脚)指的是在页面布局时,当页面的内容不足或等于一屏时,让页脚始终保持在页面的底部,如同粘在底部一样;当页面的内容超过一屏......
  • CSS的预处理器---[Less]
    CSS的预处理器---[Less]Less中文网址:http://lesscss.cn/常见的CSS预处理器:Sass、Less、Stylus1.Less使用我们首先新建一个后缀名为less的文件,在这个less文件里面书写......