当前位置: 首页 > news >正文

lable与input连用特殊动作效果

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><style>/*label 可以扩大触点  label中有一个for属性需要与id连用  */* {padding: 0;margin: 0;}input {display: none;}.container {height: 300px;width: 520px;display: flex;justify-content: space-between;margin: 150px auto;text-transform: uppercase;perspective: 1000px;}.label {display: flex;flex-direction: column;justify-content: space-between;}.label label {width: 100px;height: 90px;text-align: center;line-height: 90px;}.label label:hover {opacity: 0.8;}.label label:nth-child(1) {background: rebeccapurple;}.label label:nth-child(2) {background: yellowgreen;}.label label:nth-child(3) {background: palegreen;}.container .table_body {width: 400px;height: 300px;transform-style: preserve-3d;transform: rotateX(0deg);transition: all 1s ease;display: flex;justify-content: center;align-items: center;position: relative;}.container .table_body .table_content {position: absolute;width: 350px;height: 260px;display: flex;flex-direction: column;justify-content: center;text-align: center;color: #fff;}.container .table_body .table_content:nth-child(1) {background: rebeccapurple;transform: translateY(-130px) rotateX(90deg);}.container .table_body .table_content:nth-child(2) {background: yellowgreen;transform: translateZ(130px);}.container .table_body .table_content:nth-child(3) {background: palegreen;transform: translateY(130px) rotateX(-90deg);}#top:checked~.table_body {transform: rotateX(-90deg);}#middle:checked~.table_body {transform: rotateX(0deg);}#bottom:checked~.table_body {transform: rotateX(90deg);}</style>
</head><body><div class="container"><input type="radio" name="tab" id="top"><input type="radio" name="tab" id="middle"><input type="radio" name="tab" id="bottom"><div class="table_body"><div class="table_content"><h3>top</h3></div><div class="table_content"><h3>middle</h3></div><div class="table_content"><h3>bottom</h3></div></div><div class="label"><label for="top">top</label><label for="middle">middle</label><label for="bottom">bottom</label></div></div>
</body></html>

lable与input连用特殊动作效果

 

相关文章:

  • iPhone通话记录怎么查询?记住这3个简单方法!
  • Vue工程化
  • Python 3.6.10 中的 requests 库 TLS 1.2 强制使用问题及解决方案
  • 利用自动化和条形码优化SAP制造供应链
  • 土木非科班转码测开,斩获10家大厂offer
  • Docker Compose详细教程(从入门到放弃)
  • 使用 Redis 构建轻量的向量数据库应用:图片搜索引擎(一)
  • 携带二进制文件的软件恢复方法
  • 基于SSM+Vue的网上购物商城
  • 编程的简单实例,编程零基础入门教程,中文编程开发语言工具下载
  • Niushop单商户及多商户v5商城系统第三方商业插件cps联盟视频购物及多包装库存转换的安装
  • 后端接口性能优化分析-数据库优化
  • cookie、localStorage 和SessionStorage的区别和特点?
  • 【QT HTTP】使用QtNetwork模块制作基于HTTP请求的C/S架构
  • 逻辑回归-癌症病预测与不均衡样本评估
  • “Material Design”设计规范在 ComponentOne For WinForm 的全新尝试!
  • Druid 在有赞的实践
  • emacs初体验
  • ES6语法详解(一)
  • ES学习笔记(12)--Symbol
  • fetch 从初识到应用
  • Javascript弹出层-初探
  • JS创建对象模式及其对象原型链探究(一):Object模式
  • Mac转Windows的拯救指南
  • mysql 5.6 原生Online DDL解析
  • Python - 闭包Closure
  • Python代码面试必读 - Data Structures and Algorithms in Python
  • 百度贴吧爬虫node+vue baidu_tieba_crawler
  • 搭建gitbook 和 访问权限认证
  • 第三十一到第三十三天:我是精明的小卖家(一)
  • 巧用 TypeScript (一)
  • 温故知新之javascript面向对象
  • 一道闭包题引发的思考
  • 原生JS动态加载JS、CSS文件及代码脚本
  • 远离DoS攻击 Windows Server 2016发布DNS政策
  • 国内唯一,阿里云入选全球区块链云服务报告,领先AWS、Google ...
  • ​​​​​​​sokit v1.3抓手机应用socket数据包: Socket是传输控制层协议,WebSocket是应用层协议。
  • ​无人机石油管道巡检方案新亮点:灵活准确又高效
  • ​一、什么是射频识别?二、射频识别系统组成及工作原理三、射频识别系统分类四、RFID与物联网​
  • # 达梦数据库知识点
  • # 深度解析 Socket 与 WebSocket:原理、区别与应用
  • #git 撤消对文件的更改
  • $().each和$.each的区别
  • (C语言)fread与fwrite详解
  • (Oracle)SQL优化技巧(一):分页查询
  • (pojstep1.1.2)2654(直叙式模拟)
  • (板子)A* astar算法,AcWing第k短路+八数码 带注释
  • (附源码)node.js知识分享网站 毕业设计 202038
  • (没学懂,待填坑)【动态规划】数位动态规划
  • (五)大数据实战——使用模板虚拟机实现hadoop集群虚拟机克隆及网络相关配置
  • (一)硬件制作--从零开始自制linux掌上电脑(F1C200S) <嵌入式项目>
  • (转)VC++中ondraw在什么时候调用的
  • .NET 4.0中的泛型协变和反变
  • .net core 6 集成和使用 mongodb
  • .NET 的静态构造函数是否线程安全?答案是肯定的!