【改】 html5 中tab页面的简单转换
来源:互联网 发布:mac视频和音频不同步 编辑:程序博客网 时间:2024/06/11 01:46
.tabs {width: 100%;max-width: 455px;float: left;}#div1 input {opacity: 0;border: 1px solid #F0F0F0}#div1 label {cursor: pointer;background: -webkit-linear-gradient();color: #FBFBFF;border-radius: 5px 5px 0 0;padding: 1.5% 3%;float: left;margin-right: 2px;font: italic 1em cambria;border: 1px solid #F0F0F0;border-bottom-width: 0px;}#div1 label:hover {background: -webkit-linear-gradient(#ECFFFF,#FDFFFF);}#div1 input:checked + label {background:#ECF5FF;color: #333;}.tabs input:nth-of-type(1):checked ~ .panels .panel:first-child,.tabs input:nth-of-type(2):checked ~ .panels .panel:nth-child(2),.tabs input:nth-of-type(3):checked ~ .panels .panel:nth-child(3),.tabs input:nth-of-type(4):checked ~ .panels .panel:last-child {opacity: 1;-webkit-transition: .3s;}.panels {float: left;clear: both;position: relative;width: 100%;background: #fff;border-radius: 0 10px 10px 10px;min-height: 480px;border: 1px solid #F0F0F0;}.panel {width: 100%;opacity: 0;position: absolute;background: #fff;border-radius: 0 10px 10px 10px;padding: 4%;box-sizing: border-box;}.panel h2 {margin: 5px;font-family: Arial;}
css前端样式设置。
下边是html5页面:
<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>CSS3外观漂亮淡入淡出Tab菜单演示</title> <link rel="stylesheet" href="css/style.css" media="screen" type="text/css" /></head><body> <article class="tabs" id="div1"><input checked id="one" name="tabs" type="radio"> <label for="one">Tab One</label> <input id="two" name="tabs" type="radio" value="Two"> <label for="two">Tab Two</label> <input id="three" name="tabs" type="radio"> <label for="three">Tab Three</label> <input id="four" name="tabs" type="radio"> <label for="four">Tab Four</label> <div class="panels"> <div class="panel">div1 </div> <div class="panel"> div2 </div> <div class="panel"> div3 </div> <div class="panel"> div4 </div></div> </article></body></html>
阅读全文
0 0
- 【改】 html5 中tab页面的简单转换
- 简单好用的tab切换页面
- 最简单的tab页面切换+动画
- HTML页面简单TAB
- 简单的增删改查页面
- 简单的 增删改 某类别页面
- 简单的HTML中TAB分页实现,js控制页面tr行新增、删除、修改
- HTML5写的简单登录页面
- MFC 中Tab Control的简单使用
- MFC 中Tab Control的简单使用
- 一个简单的Css实现的Tab页面
- bootStrap可以简单方便的实现tab页面的切换
- linux简单的文本合并以及tab键转换
- html5中页面拨打电话的方式
- html5中页面拨打电话的方式
- html5中页面拨打电话的方式
- html5中页面拨打电话的方式
- html5中页面拨打电话的方式
- Calling C Code From Mono/.NET
- linux命令
- C语言实验——数日子
- IOS svn cornerstone 提交报错:The operation could not be completed.
- java程序员从笨鸟到菜鸟之(四十一)线程初涉
- 【改】 html5 中tab页面的简单转换
- 适用于 Azure 虚拟网络的常见 PowerShell 命令
- 顺序表基本算法的是实现
- 原码, 反码, 补码 详解
- VMware网络详解 桥接 主机 NAT模式
- 【Struts2】4.文件上传与下载
- 文章标题
- DateUtils 日期工具类
- [学习笔记]MySQL基础使用