css3 checkbox动画
来源:互联网 发布:英雄杀这次探宝数据 编辑:程序博客网 时间:2024/06/05 07:37
<template> <div class="container"> <div class="checkbox"> <input id="checkbox-1" name="checkbox" type="checkbox" checked> <label for="checkbox-1" class="checkbox-label">Checked</label> </div> <div class="checkbox"> <input id="checkbox-3" name="checkbox" type="checkbox" disabled> <label for="checkbox-3" class="checkbox-label">Disabled</label> </div> </div></template><style lang="stylus" rel="stylesheet/stylus"> $color1 = #f4f4f4; $color2 = #3197EE; .checkbox { margin: 0.5rem; input[type="checkbox"] { position: absolute; opacity: 0; + .checkbox-label { &:before { content: ''; background: $color1; border-radius: 100%; border: 1px solid darken($color1, 25%); display: inline-block; width: 1.4em; height: 1.4em; position: relative; top: -0.2em; margin-right: 1em; vertical-align: top; cursor: pointer; text-align: center; transition: all 250ms ease; } } &:checked { + .checkbox-label { &:before { background-color: $color2; box-shadow: inset 0 0 0 4px $color1; } } } &:focus { + .checkbox-label { &:before { outline: none; border-color: $color2; } } } &:disabled { + .checkbox-label { &:before { box-shadow: inset 0 0 0 4px $color1; border-color: darken($color1, 25%); background: darken($color1, 25%); } } } + .checkbox-label { &:empty { &:before { margin-right: 0; } } } } }</style>
阅读全文
0 0
- css3 checkbox动画
- css3动画
- css3动画
- css3动画
- css3动画
- css3动画
- CSS3动画
- css3.动画
- CSS3动画
- CSS3动画
- CSS3动画
- css3-动画
- CSS3动画
- css3动画
- css3动画
- CSS3 动画
- CSS3动画
- CSS3动画
- Android 5.0 Camera系统源码分析(3):Camera预览流程控制流
- 拼多多笔试题一:给出一个无序整数数组,求任意三个数的最大乘积
- 计算机运行命令全集(win)
- 【Java】WebMagic实现的最基本的爬虫
- appium自动化测试
- css3 checkbox动画
- R语言地图可视化
- 新手学C++多线程编程(4)多任务与多线程编程
- 2.1.16 —线性表—Rotate Image
- 【几何】hdu 6055 Regular polygon
- android 启动时出现空白带标题的页面解决办法
- 关于APP广告也面图片的保存问题
- 百练noi21:二维数组右上左下遍历,24:蛇形填充数组
- 2017 Multi-University Training Contest 3( hdu 6060) RXD and dividing