在线演示:

http://www.script-tutorials.com/demos/236/index.html

1.[文件] source.zip ~ 25KB     下载(208)

2.[代码][HTML]代码

Tab #1

Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation semantics (the look and formatting) of a document written in a markup language. Its most common application is to style web pages written in HTML and XHTML, but the language can also be applied to any kind of XML document, including plain XML, SVG and XUL.

Tab #2

Tab #3

CSS is designed primarily to enable the separation of document content (written in HTML or a similar markup language) from document presentation, including elements such as the layout, colors, and fonts.[1] This separation can improve content accessibility, provide more flexibility and control in the specification of presentation characteristics, enable multiple pages to share formatting, and reduce complexity and repetition in the structural content (such as by allowing for tableless web design). CSS can also allow the same markup page to be presented in different styles for different rendering methods, such as on-screen, in print, by voice (when read out by a speech-based browser or screen reader) and on Braille-based, tactile devices. It can also be used to allow the web page to display differently depending on the screen size or device on which it is being viewed. While the author of a document typically links that document to a CSS style sheet, readers can use a different style sheet, perhaps one on their own computer, to override the one the author has specified.

Tab #4

3.[代码]css/accordion.css

.accordion {

color: #000000;

margin: 50px auto;

position: relative;

width: 590px;

}

.accordion span {

display: none

}

.tabs {

background-color: #FFFFFF;

overflow: hidden;

}

.tabs dl dd a {

background-color: #C8CEFF;

border: 1px solid;

border-color:#ccc;border-bottom-color:#aaa;

display: block;

font-size: 18px;

line-height: 32px;

padding: 5px 20px;

text-decoration: none;

filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#ffffffff,EndColorStr=#ffe0e0e0);

background-image: -moz-linear-gradient(top,#fff 0,#e0e0e0 100%);

background-image: -ms-linear-gradient(top,#fff 0,#e0e0e0 100%);

background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);

background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(100%,#e0e0e0));

background-image: -webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);

background-image: linear-gradient(to bottom,#fff 0,#e0e0e0 100%);

-moz-transition: 0.3s;

-ms-transition: 0.3s;

-o-transition: 0.3s;

-webkit-transition: 0.3s;

transition: 0.3s;

}

.tabs dl dd div {

background-color: #FFF;

height: 0;

overflow: hidden;

box-shadow: 0 0 1px rgba(0, 0, 0, 1) inset;

-moz-box-shadow: 0 0 1px rgba(0, 0, 0, 1) inset;

-webkit-box-shadow: 0 0 1px rgba(0, 0, 0, 1) inset;

-webkit-transition: all 0.3s ease-in-out;

-moz-transition: all 0.3s ease-in-out;

-o-transition: all 0.3s ease-in-out;

-ms-transition: all 0.3s ease-in-out;

transition: all 0.3s ease-in-out;

}

.tabs dl dd div p {

color: #444444;

font-size: 13px;

padding: 15px;

text-align: justify;

}

.tabs dl dd a:hover {

box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5) inset;

-moz-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5) inset;

-webkit-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5) inset;

}

.tabs dl dd a:active {

filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#e6e6e6,EndColorStr=#dcdcdc);

background-image: -moz-linear-gradient(top,#e6e6e6 0,#dcdcdc 100%);

background-image: -ms-linear-gradient(top,#e6e6e6 0,#dcdcdc 100%);

background-image: -o-linear-gradient(top,#e6e6e6 0,#dcdcdc 100%);

background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0,#e6e6e6),color-stop(100%,#dcdcdc));

background-image: -webkit-linear-gradient(top,#e6e6e6 0,#dcdcdc 100%);

background-image: linear-gradient(to bottom,#e6e6e6 0,#dcdcdc 100%);

}

#tab1:target ~ .tabs .tab1 dd div {

height: 100px;

}

#tab2:target ~ .tabs .tab2 dd div {

height: 345px;

}

#tab3:target ~ .tabs .tab3 dd div {

height: 235px;

}

#tab4:target ~ .tabs .tab4 dd div {

height: 235px;

}

#tab1:target ~ .tabs .tab1 dd a,

#tab2:target ~ .tabs .tab2 dd a,

#tab3:target ~ .tabs .tab3 dd a,

#tab4:target ~ .tabs .tab4 dd a {

filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#e6e6e6,EndColorStr=#dcdcdc);

background-image: -moz-linear-gradient(top,#e6e6e6 0,#dcdcdc 100%);

background-image: -ms-linear-gradient(top,#e6e6e6 0,#dcdcdc 100%);

background-image: -o-linear-gradient(top,#e6e6e6 0,#dcdcdc 100%);

background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0,#e6e6e6),color-stop(100%,#dcdcdc));

background-image: -webkit-linear-gradient(top,#e6e6e6 0,#dcdcdc 100%);

background-image: linear-gradient(to bottom,#e6e6e6 0,#dcdcdc 100%);

box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5) inset;

-moz-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5) inset;

-webkit-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5) inset;

}

html5实现窗帘,纯 CSS3 实现的窗帘菜单 Accordion相关推荐

  1. html5云朵效果,纯CSS3打造逼真的多层云彩动画特效

    这是一款效果非常炫酷的纯CSS3逼真的多层云彩动画特效.该特效使用多张透明的云彩PNG图片作为背景图片,使用CSS animation动画来制作云彩水平飘动的动画效果. 使用方法 HTML结构 该多层 ...

  2. html5可折叠面板,纯CSS3炫酷3D折叠面板动画特效

    这是一款纯 CSS3 制作的炫酷3D折叠面板动画特效.这个效果使用3D CSS animations 来制作折叠面板的动画,纯CSS,没有使用javascript. HTML结构 折叠面板的html结 ...

  3. 左侧侧拉栏html,侧边抽屉_纯CSS3抽屉式滑动侧边栏菜单设计

    插件描述:该侧边栏在鼠标滑过菜单项时,会以平滑的方式滑出相应的主菜单,就像拉开抽屉的效果,非常的时尚. 侧边栏菜单设计说明 这是一款使用纯CSS3制作的抽屉式滑动侧边栏菜单设计效果.该侧边栏在鼠标滑过 ...

  4. html5水滴动画,纯css3水滴元素动画特效

    css3 animation属性绘制水滴落下波纹动画,网页水滴元素动画特效. 使用方法: 1.head引入css文件 body { background-color: #3498DB; overflo ...

  5. html中怎么做扇形菜单,纯CSS3实现扇形动画菜单(简化版)实例源码

    之前的一篇文章介绍这种效果的实现,但实现代码太过繁琐,所以在这里分享以下简化版的实现方法,有需要的可以参考学习. 原文章请点击这里 简化版完整实例 CSS3扇形动画菜单 *{padding: 0; m ...

  6. 创意css汉堡菜单动画,纯CSS3实现的汉堡菜单、飞碟和小行星动画

    CSS 语言: CSSSCSS 确定 html, body { width: 100%; height: 100%; margin: 0; } body { background: #50C9C3; ...

  7. html5 css3 卡片切换,HTML5之纯CSS3实现的tab标签切换

    HTML5的运用之纯CSS3实现的tab标签切换 CSS3代码实现的tab标签切换 *{padding:0px;margin:0px;} #tab{margin:20px;20px;position: ...

  8. 8个超震撼的HTML5和纯CSS3动画源码

    HTML5和CSS3之所以强大,不仅因为现在大量的浏览器的支持,更是因为它们已经越来越能满足现代开发的需要.Flash在几年之后肯定会消亡,那么HTML5和CSS3将会替代Flash.今天我们要给大家 ...

  9. 纯html css动画效果,8个超震撼的HTML5和纯CSS3动画源码

    本文作者html5tricks,转载请注明出处 1.HTML5 Canvas水波纹动画特效 HTML5的Canvas特性非常实用,我们不仅可以在Canvas画布上绘制各种图形,也可以制作绚丽的动画,比 ...

最新文章

  1. [CODEVS 1050] 棋盘染色 2
  2. maven中去掉单元测试的配置
  3. tomcat服务器安装
  4. 【Django】Django Debug Toolbar调试工具配置
  5. KVO 实现两个页面之间的通信
  6. Java集合源码学习(4)HashSet
  7. mac下直接下载xcode的地址
  8. 衬线字体、无衬线字体、等宽字体的定义和LaTeX命令以及text系列与family系列、series系列、shape系列的区别和联系
  9. .Net·使用ILSpy反编译exe或dll文件保存为项目结构
  10. c语言提示函数已有主体,C++中的函数名称粉碎机制和它的逆向应用 筋斗云网络...
  11. 网狐精华版后台修改记录
  12. ThinkBook 14 G2 ITL 重装系统 笔记
  13. Reincarnation HDU - 4622 (后缀自动机)
  14. 高德地图API定位失败 浏览器定位 IP定位
  15. Unity背包系统-2:数据库存储方法ScriptableObject和显示背包物品InventoryManager
  16. 视频拼接剪辑怎么弄?分享三个小妙招给你们
  17. Qt编写物联网管理平台32-表格数据
  18. vue中根据汉字生成拼音
  19. python计算移动平均线_(转)简单移动平均线(Simple Moving Average,SMA) 定义及使用...
  20. AspectJ编译器织入与SpringAOP的运行期织入

热门文章

  1. springboot引入国际化
  2. Python.random.seed()用法
  3. 区块链的4种技术创新
  4. 移动互联网的发展现状和发展趋势
  5. ffmpeg输出x264的CBR流或者文件
  6. tomcat使用详解(week4_day2)--技术流ken
  7. 清理电脑垃圾的命令代码
  8. 服务器维修预算申请,云服务器费用预算申请范文
  9. Python+Selenium自动搜索基金业协会指定企业名单,抓取指定信息并保存到数据库...
  10. 2019python下半年考试报名时间_【2019下半年CATTI考试报名时间汇总】- 环球网校