Topcoat也是一个简单的网页表单构建应用。与SemanticUI、BootMetro等CSS框架不同,Topcoat主要用于构建美化的Web表单,包括提交按钮、输入框、radio/checkbox、滑块、搜索框等Form元素。Topcoat的特点是小巧、简单、易用。专注于表单元素的设计。每个表单元素都非常精致,并且支持移动,让这些表单元素在移动端也有不错的效果。Topcoat相关组件示例按钮以蓝色按钮为例。代码如下:HTMLButtonButtonCSS。topcoat-button--large--cta{font-size:0.875rem;font-weight:600;line-height:1.688rem;padding:00.875rem;}input[type="checkbox"]{position:absolute;overflow:隐;填充:0;边框:0;不透明度:0.001;z-index:1;垂直对齐:顶部;轮廓:无;}.checkbox{-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.checkbox__label{position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;-moz-user-选择:无;-ms-用户选择:无;用户-s选择:无;}.checkbox--禁用{opacity:0.3;cursor:default;pointer-events:none;}.checkbox:before,.checkbox:after{content:'';position:absolute;}.checkbox:before{-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;}input[type="checkbox"]{position:absolute;overflow:hidden;padding:0;border:0;opacity:0.001;z-index:1;vertical-align:top;outline:none;}.checkbox,.topcoat-checkbox__checkmark{-moz-box-sizing:border-box;box-sizing:border-框;背景剪辑:填充框;位置:相对;显示:内联块;垂直对齐:顶部;光标:默认;-webkit-用户选择:无;-moz-用户选择:无;-ms-user-select:none;user-select:none;}.checkbox__label,.topcoat-checkbox{position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.checkbox--disabled,input[type="checkbox"]:disabled+.topcoat-checkbox__checkmark{opacity:0.3;光标:默认;指针事件:无;}.checkbox:之前,.checkbox:之后,.topcoat-checkbox__checkmark:之前,.topcoat-checkbox__checkmark:之后{内容:'';位置:绝对;}.checkbox:之前,.topcoat-checkbox__checkmark:before{-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;}单选框/复选框以单选框为例,相关代码如下:HTML