纯CSS定义input ratio样式

这里写图片描述
控件代码


布局代码

input[type='radio'] {
    outline: none;
    margin: -2px 5px 1px 20px;
    width: 24px;
    height: 24px;
    vertical-align: middle;
    font-family: PingFangSC-Regular;
    color: rgba(56, 71, 68, 1);
    -webkit-appearance: none;
    border: 1px solid #ddd;
    display: inline-block;
    border-radius: 50%;
}

input[type='radio']:checked:before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #108EE9;
    position: absolute;
    top: 4px;
    left: 4px;
}

input[type='radio']:checked {
    display: inline-block;
    border: 1px solid #108EE9;
    border-radius: 50%;
    position: relative;
}

CSS、JS压缩工具类

yuicompressor-2.4.8.jar

压缩命令
java -jar yui.jar --type css --charset utf-8 task.css -o task.min.css

你可能感兴趣的:(React)