点击 input 时 不显示聚焦边框
input{
outline: none;
}
改变 input 中 placeholder 属性默认样式
input::-webkit-input-placeholder {
color:red;
font-size:16px;
}
改变 input 中 type 属性为 text 时
input[type=‘text‘]{
color:yellow;
font-size:16px;
}
改变 input 中 type 属性为 radio 时
input[type=‘radio‘] {
display: inline-block;
vertical-align: middle;/*设置元素的垂直对齐方式*/
width: 16px;
height: 16px;
-webkit-appearance: none;
background-color: transparent;
outline: 0 !important;
border: 1px solid #03A9F4;
border-radius: 50%;
}
input[type=‘radio‘]:checked {
background-color: #03A9F4;
background-clip: content-box; /*背景被裁剪到内容框*/
padding: 2px;
}
原文:https://www.cnblogs.com/hungryC/p/12928898.html