UNPKG

philosophyship-mobile

Version:
115 lines (109 loc) 2.52 kB
/* 表单的单行容器 */ .tt-form-item { display: flex; position: relative; padding-left: 1rem; border-bottom: 1px solid #eee; } /* 去掉最后一行的下边框 */ .tt-form-item:last-child { border-bottom: none; } /* 表单标签 */ .tt-form-item > .tt-form-label{ display: block; width: 3.5rem; font-size: .8rem; color: #666; height: 2rem; line-height: 2rem; } /* 表单内容区 */ .tt-form-item > .tt-form-body{ flex: 1; } /* 输入框 */ .tt-form-item > .tt-form-body > .tt-input{ width: 100%; height: 2rem; line-height: 2rem; font-size: .8rem; border:none; } /* 表单中的清空按钮 */ .tt-form-item > .tt-form-body > .tt-input-reset{ position: absolute; width: .8rem; height: .8rem; line-height: .8rem; top: 50%; margin-top: -.4rem; right: 1rem; font-size: .6rem; background: #aaa; color: #fff; border-radius: 50%; } /* 表单中的错误提示按钮 */ .tt-form-item > .tt-form-body > .tt-input-warning{ position: absolute; width: .8rem; height: .8rem; line-height: .8rem; top: 50%; margin-top: -.4rem; right: 1rem; font-size: .6rem; border-radius: 50%; color: red; border: 1px solid red; } /* 自定义单选 */ .tt-form-item > .tt-radio{ flex: 1; font-size: .8rem; line-height: 2rem; } /* 未选中状态的图标 */ .tt-form-item > .tt-radio > .tt-radio-icon{ margin-right: .5rem; color: #09BB07; visibility: hidden; } /* 选中状态的图标 */ .tt-form-item > .tt-radio.checked > .tt-radio-icon{ visibility: visible; } /* 隐藏的radio类型的input */ .tt-form-item > .tt-radio > .tt-radio-input{ position: absolute; left: -999rem; } /* 自定义多选 */ .tt-form-item > .tt-check{ flex: 1; font-size: .8rem; line-height: 2rem; } /* 未选中时的图标 */ .tt-form-item > .tt-check > .tt-check-icon{ margin-right: .5rem; border: 1px solid #ccc; border-radius: 50%; color: rgba(0,0,0,0); font-size: .6rem; width: .8rem; height: .8rem; line-height: .8rem; } /* 选中时的图标 */ .tt-form-item > .tt-check.checked > .tt-check-icon{ background: #09BB07; color: #fff; border-color: rgba(0,0,0,0) } /* 隐藏的check类型的input */ .tt-form-item > .tt-check > .tt-check-input{ position: absolute; left: -999rem; }