前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >前端技能小结——css篇

前端技能小结——css篇

作者头像
流眸
发布2019-08-09 23:39:49
3240
发布2019-08-09 23:39:49
举报
去掉type=number的箭头
  input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{      -webkit-appearance: none;  }  input[type="number"]{      -moz-appearance: textfield;  }  input{      -webkit-user-select: text !important;      -webkit-tap-hightlight-color: rgba(0,0,0,0);  }
绝对居中
/* 1 */.father{  position: absolute;  top: 50%;  left: 50%;}.son{  transform: translate(-50%, -50%);}/* 2 */.father{  position: absolute;  display: flex;  justify-content;  align-items: center;}
css媒体查询
/*自适应尺寸*/@media screen and (max-width: 360px) {    html {        font-size: 10px;    }}@media (min-width: 361px) and (max-width: 420px) {    html {        font-size: 11px;    }}@media (min-width: 421px) and (max-width: 480px) {    html {        font-size: 12px;    }}@media (min-width: 481px) and (max-width: 540px) {    html {        font-size: 13px;    }}@media (min-width: 541px) and (max-width: 640px) {    html {        font-size: 14px;    }}@media (min-width: 641px) and (max-width: 750px) {    html {        font-size: 15px;    }}@media screen and (min-width: 751px) {    html {        font-size: 20px;    }}
iOS去除点击阴影
-webkit-tap-highlight-color: rgba(0,0,0,0)
css滚动条样式
/*1*/.progress1 ul{height:50px;overflow:auto;}.progress1 ul::-webkit-scrollbar {/*滚动条整体样式*/            width: 4px; /*高宽分别对应横竖滚动条的尺寸*/            height:4px;}.progress1 ul::-webkit-scrollbar-thumb {/*滚动条里面小方块*/    border-radius: 5px;    -webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);    background:lightblue;}.progress1 ul::-webkit-scrollbar-track {/*滚动条里面轨道*/   -webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);   border-radius: 0;   background: rgba(0,0,0,0.1);}/*2*/.modalBox .modalBody::-webkit-scrollbar {/*滚动条整体样式*/    width: 6px; /*高宽分别对应横竖滚动条的尺寸*/    height:15px;}.modalBox .modalBody::-webkit-scrollbar-thumb {/*滚动条里面小方块*/    background:rgba(89,126,247,0.2);    border-radius: 2px;}.modalBox .modalBody::-webkit-scrollbar-track {/*滚动条里面轨道*/    border-radius: 0;    background:#fff;}
本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2019-07-23,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 流眸 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 去掉type=number的箭头
  • 绝对居中
  • css媒体查询
  • iOS去除点击阴影
  • css滚动条样式
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档