css设置placeholder和滚动条

86 阅读1分钟

Date: 2017-04-03

css设置placeholder

stackoverflow.com/questions/4…

input::-webkit-input-placeholder { /* WebKit browsers */
  line-height: 1.5em;
}
input:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
  line-height: 1.5em;
}
input::-moz-placeholder { /* Mozilla Firefox 19+ */
  line-height: 1.5em;
}
input:-ms-input-placeholder { /* Internet Explorer 10+ */
  line-height: 1.5em;
}

css设置滚动条

www.xuanfengge.com/css3-webkit…

CSS3自定义滚动条样式 -webkit-scrollbar

/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
::-webkit-scrollbar{
  width: 0.8rem;
  height: 0.8rem;
  background-color: #eee;
}

/*定义滚动条轨道 内阴影+圆角*/
::-webkit-scrollbar-track{
  -webkit-box-shadow: inset 0 0 0.4rem rgba(0,0,0,0.3);
  border-radius: 0.8rem;
  background-color: #eee;
}

/*定义滑块 内阴影+圆角*/
::-webkit-scrollbar-thumb{
  border-radius: 0.8rem;
  -webkit-box-shadow: inset 0 0 0.4rem rgba(0,0,0,.3);
  background-color: #ccc;
}