Web表单美化CSS框架Topcoat
2023-09-27 14:23:38 时间
按钮
以蓝色按钮为例,相关代码如下:
HTML
button Button /button button disabled Button /button .topcoat-button--large--cta { font-size: 0.875rem; font-weight: 600; line-height: 1.688rem; padding: 0 0.875rem; input[type="checkbox"] { position: absolute; overflow: hidden; padding: 0; border: 0; opacity: 0.001; z-index: 1; vertical-align: top; outline: none; .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-select: none; -ms-user-select: none; user-select: none; .checkbox--disabled { 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-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, .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; cursor: default; pointer-events: none; .checkbox:before, .checkbox:after, .topcoat-checkbox__checkmark:before, .topcoat-checkbox__checkmark:after { content: ; position: absolute; .checkbox:before, .topcoat-checkbox__checkmark:before { -moz-box-sizing: border-box; box-sizing: border-box; background-clip: padding-box;
单选框/复选框
以单选框为例,相关代码如下:
HTML !-- NO LABEL -- label input type="radio" name="topcoat" div /div /label br br !-- LEFT LABEL -- label Left label input type="radio" name="topcoat" div /div /label br br !-- RIGHT LABEL -- label input type="radio" name="topcoat" div /div Right label /label br br !-- DISABLED -- label input type="radio" name="topcoat" Disabled div /div Disabled /label CSS: input[type="radio"] { height: 1.063rem; width: 1.063rem; margin-top: 0; margin-right: -1.063rem; margin-bottom: -1.063rem; margin-left: 0; input[type="radio"]:checked + .topcoat-radio-button__checkmark:after { opacity: 1; .topcoat-radio-button { color: #c6c8c8; line-height: 1.063rem; .topcoat-radio-button__checkmark:before { width: 1.063rem; height: 1.063rem; background: #595b5b; border: 1px solid #333434; box-shadow: inset 0 1px #737373; .topcoat-radio-button__checkmark { position: relative; width: 1.063rem; height: 1.063rem; .topcoat-radio-button__checkmark:after { opacity: 0; width: 0.313rem; height: 0.313rem; background: #c6c8c8; border: 1px solid rgba(0,0,0,0.05); box-shadow: 0 1px rgba(255,255,255,0.1); -webkit-transform: none; -ms-transform: none; transform: none; top: 0.313rem; left: 0.313rem; input[type="radio"]:focus + .topcoat-radio-button__checkmark:before { border: 1px solid #0036ff; box-shadow: inset 0 1px rgba(255,255,255,0.36), 0 0 0 2px #6fb5f1; input[type="radio"]:active + .topcoat-radio-button__checkmark:before { border: 1px solid #333434; background-color: #3f4041; box-shadow: inset 0 1px rgba(0,0,0,0.05); input[type="radio"]:disabled:active + .topcoat-radio-button__checkmark:before { border: 1px solid #333434; background: #595b5b; box-shadow: inset 0 1px #737373; .range { padding: 0; margin: 0; font: inherit; color: inherit; background: transparent; border: none; -moz-box-sizing: border-box; box-sizing: border-box; background-clip: padding-box; vertical-align: top; outline: none; -webkit-appearance: none; .range__thumb { cursor: pointer; .range__thumb--webkit { cursor: pointer; -webkit-appearance: none; .range:disabled { opacity: 0.3; cursor: default; pointer-events: none; .range, .topcoat-range { padding: 0; margin: 0; font: inherit; color: inherit; background: transparent; border: none; -moz-box-sizing: border-box; box-sizing: border-box; background-clip: padding-box; vertical-align: top; outline: none; -webkit-appearance: none; .range__thumb, .topcoat-range::-moz-range-thumb { cursor: pointer; .range__thumb--webkit, .topcoat-range::-webkit-slider-thumb { cursor: pointer; -webkit-appearance: none; .range:disabled, .topcoat-range:disabled { opacity: 0.3; cursor: default; pointer-events: none;
更多关于Topcoat的组件,大家可以前往其官方网站进行学习。
作者:佚名
来源:51CTO
彩虹女神跃长空,Go语言进阶之Go语言高性能Web框架Iris项目实战-JWT和中间件(Middleware)的使用EP07 前文再续,上一回我们完成了用户的登录逻辑,将之前用户管理模块中添加的用户账号进行账号和密码的校验,过程中使用图形验证码强制进行人机交互,防止账号的密码被暴力破解。本回我们需要为登录成功的用户生成Token,并且通过Iris的中间件(Middleware)进行鉴权操作。
彩虹女神跃长空,Go语言进阶之Go语言高性能Web框架Iris项目实战-完善用户管理EP04 书接上回,上一回我们完成了用户管理页面的构建,并且通过前端的Vue.js框架动态地获取表单数据,同时异步请求后端Iris接口进行入库操作,过程中使用函数封装可复用的逻辑。 本回我们将继续完善用户管理功能。
彩虹女神跃长空,Go语言进阶之Go语言高性能Web框架Iris项目实战-用户系统EP03 前文再续,之前一篇我们已经配置好了数据库以及模板引擎,现在可以在逻辑层编写具体业务代码了,博客平台和大多数在线平台一样,都是基于用户账号体系来进行操作,所以我们需要针对用户表完成用户账号的CURD操作。
传统Web框架迁移 与其说Serverless架构是一个新的概念/架构,倒不如说他是一个全新的思路,一种新的编程范式,在这种新的架构下,或者说新的编程范式下,使用全新的思路来做Serverless应用是再好不过的了,但是实际上并不是这样的,原生的Serverless开发框架是非常少的,以Web框架为例,目前的主流的Web框架“均不支持Serverless模式部署”,一方面是我们要尝试接触Serverless,一方面又没办法完全放弃传统框架,所以将传统框架如果更简单、更快速、更科学的部署到Serverless架构上就是一个值得探讨的问题。
相关文章
- web基础---->session的使用
- web前端和后端的区别
- RDIFramework.NET V3.3 Web框架主界面新增横向菜单功能
- .NET快速信息化系统开发框架 V3.2 -> Web 用户管理模块编辑界面-组织机构选择支持级联选择
- RDIFramework.NET ━ .NET快速信息化系统开发框架 V3.2->Web版本模块管理界面新增模块排序功能
- Srping RestTemplate 将 Web 上的 JSON 数据快速本地实例化
- Go-Web框架:Beego
- 创建与使用Web API
- 从零开始搭建论坛(一):Web服务器与Web框架
- 10款Web开发最佳的Python框架
- 如何在Ubuntu 18.04上安装Apache Web服务器
- java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet解决
- golang web框架设计5:配置设计
- springmvc框架通过web.xml配置404 500错误导向页
- Moco 框架以及其在 Web 集成测试的应用
- web应用服务端cache策略初探
- 使用eclipse搭建第一个java web应用
- java web开发(aop编程)
- SmartClient框架相结合,Web应用程序提供
- 为什么 WebAssembly 框架是 Web 的未来
- ASP.NET MVC是如何运行的[1]: 建立在“伪”MVC框架上的Web应用
- SPWebServer:一个基于 SPServer 的 web 服务器框架
- 创建一个入门的JAVA WEB站点(REST JERSEY)
- WEB语言转义总结
- 草草弄完SPRING WEB-FLOW
- 测试Flask+PYTHON的WEB框架
- Web前端面试——HTTP部分