常用 更改input的placeholder颜色和滚动条样式更改

/*更改input的placeholder颜色*/
input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {

    color:#CCCCCC;
}
input:-moz-placeholder, textarea:-moz-placeholder {
    color:    #CCCCCC;
}
input::-moz-placeholder, textarea::-moz-placeholder {
    color:    #CCCCCC;
}
input:-ms-input-placeholder, textarea:-ms-input-placeholder {
    color:    #CCCCCC;
}

/*滚动条样式*/
ul::-webkit-scrollbar-track-piece,div::-webkit-scrollbar-track-piece {
    background-color: rgba(0, 0, 0, 0);
    border-left: 1px solid rgba(0, 0, 0, 0);
}
ul::-webkit-scrollbar,div::-webkit-scrollbar {
    width: .05rem;
    height: .1rem;
    -webkit-border-radius: .08rem;
    -moz-border-radius: .08rem;
    border-radius: .08rem;
}
ul::-webkit-scrollbar-thumb,div::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.5);
    background-clip: padding-box;
    -webkit-border-radius: .08rem;
    -moz-border-radius: .08rem;
    border-radius: .08rem;
    min-height: 28px;
}
ul::-webkit-scrollbar-thumb:hover,div::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.5);
    -webkit-border-radius: .08rem;
    -moz-border-radius: .08rem;
    border-radius: .08rem;
}
/*单选按钮*/
input[type="radio"]+span::before {
    content: "\a0"; /*不换行空格*/
    display: inline-block;
    vertical-align: middle;
    font-size: .12rem;
    width: .22rem;
    height: .22rem;
    margin-right: .1rem;
    border-radius: 50%;
    border: 1px solid #CCCCCC;
    text-indent: .15rem;
    line-height: 1;
    margin-top: -.05rem;
}
input[type="radio"]:checked + span::before {
    background-color: #186DC8;
    background-clip: content-box;
    padding: .02rem;
    width: .16rem;
    height: .16rem;
}
input[type="radio"] {
    position: absolute;
    clip: rect(0, 0, 0, 0);
}

 

posted @ 2018-03-21 16:55  微语123  阅读(304)  评论(0编辑  收藏  举报