重置样式表--HTML

重置样式表

  • 这就是一个简单的我自己使用的重置样式表
  • 里面的话 大多数的重置是都有啦的
  • 大家没有的可以收藏起来 拿去用
html{
	/* 标准字体大小可以,在移动端使用的rem适配的话会动态改变。 */
   font-size:14px;
   /*  使用IE盒模型(个人取舍,我一般设置width是这是盒子的真实大小,包括padding和border) */
   box-sizing: border-box;
   
 }
 
 html,body{
	/* 在有些手机浏览器中点击一个链接或着可点击元素的时候,会出现一个半透明的灰色背景; */
   -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
	 /* 提升移动端滚动的体验效果  */
   -webkit-overflow-scrolling: touch;
   overflow-scrolling: touch;
	/* 与浏览器窗口高度一致 */
   height: 100%;
 }
 
 body{
	/* 有些背景默认为浅灰色,所以统一设置为纯白 */
   background: #fff;
	/* 照着antd上面来的,在公司就别用微软雅黑了,不建议字体使用rem。 */
   font:14px,-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Hiragino Sans GB','Microsoft YaHei',
   'Helvetica Neue',Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol'
	/* 使字体更加顺滑 */
   -webkit-font-smoothing: antialiased;
   -moz-osx-font-smoothing: grayscale;
 }
 
  /* 去除浏览器默认的margin和padding, 自行删减一些不必要的标签 */
 body,
 p,
 h1,
 h2,
 h3,
 h4,
 h5,
 h6,
 dl,
 dd,
 ul,
 ol,
 th,
 td,
 button,
 figure,
 input,
 textarea,
 form,
 pre,
 blockquote,
 figure{
 margin: 0;
 padding: 0;
 }
 
 a{
	/* 小手 */
   cursor: pointer;
	/* 取消超链接的默认下划线 */
   text-decoration:none;
	/* antd里面还做了 , 看你团队需不需要这样的风格 */
   transition: color 0.3s ease;
 }
 
 ol,
 ul{
	/* 去除自带的ugly样式。 */
   list-style:none     
 }
 
  /* 这些节点部分属性没有继承父节点样式,所有继承一下,并取消outline,外轮廓的效果 */
 a,
 h1,
 h2,
 h3,
 h4,
 h5,
 h6,
 input,
 select,
 button,
 textarea {
 font-family: inherit;
 font-size: inherit;
 font-weight: inherit;
 font-style: inherit;
 line-height: inherit;
 color: inherit;
 outline: none;
 }
 
 button,
 input[type='submit'],
 input[type='button'] {
  /* 可点击小手 */
 cursor: pointer;
 }
  /* 取消部分浏览器数字输入控件的操作按钮 apperance可以改变控件的外观。 */
 input[type='number'] {
 -moz-appearance: textfield;
 }
 input[type=number]::-webkit-inner-spin-button,
 input[type=number]::-webkit-outer-spin-button {
 margin: 0;
 -webkit-appearance: none;
 }
 /**
  * 删除Firefox中的内边框和填充。
  */
 button::-moz-focus-inner,
 [type="button"]::-moz-focus-inner,
 [type="reset"]::-moz-focus-inner,
 [type="submit"]::-moz-focus-inner {
   border-style: none;
   padding: 0;
 }
 /**
  * 让html5中的hidden在IE10中正确显示
  */
 
 [hidden] {
   display: none;
 }
 template {
  /* 有些浏览器会显示template 不过template标签用的也少,自行取舍。 */
 display: none;
 }
 input,textarea,button,select{
    border:none;
 }
 input:focus,textarea:focus,button:focus,select:focus{
    outline: none;
    /* 木有外边框 */
 }
 
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值