[css3]切换图片知识点
来源:互联网 发布:mac双系统win8蓝屏 编辑:程序博客网 时间:2024/05/18 03:56
imooc 网自学的小测试 CSS-切换图片
http://www.imooc.com/code/1882
学习点一:伪类选择器:
动态伪类:L oVeHAte
http://www.imooc.com/code/1882
学习点一:伪类选择器:
动态伪类:L oVeHAte
.demo a:link {color:gray;}/*链接没有被访问时前景色为灰色*/.demo a:visited{color:yellow;}/*链接被访问过后前景色为黄色*/.demo a:hover{color:green;}/*鼠标悬浮在链接上时前景色为绿色*/.demo a:active{color:blue;}/*鼠标点中激活链接那一下前景色为蓝色*/
nth选择器
:first-child选择某个元素的第一个子元素;:last-child选择某个元素的最后一个子元素;:nth-child()选择某个元素的一个或多个特定的子元素;:nth-last-child()选择某个元素的一个或多个特定的子元素,从这个元素的最后一个子元素开始算;从1开始算:nth-of-type()选择指定的元素;:nth-last-of-type()选择指定的元素,从元素的最后一个开始计算;:first-of-type选择一个上级元素下的第一个同类子元素;:last-of-type选择一个上级元素的最后一个同类子元素;:only-child选择的元素是它的父元素的唯一一个了元素;:only-of-type选择一个元素是它的上级元素的唯一一个相同类型的子元素;:empty选择的元素里面没有任何内容;
否定选择器
input:not([type="submit"]) {border: 1px solid red;}
伪元素
:first-line,:first-letter,:before,:after;
元素状态伪类
:enabled,:disabled ;:checked;:target
input[type="text"]:disabled {border:1px solid #999;background-color: #fefefe;}
学习点二:将图片动画设置为类,方便调用
学习点三:动画设置关键帧
@-webkit-keyframes 'rotate' { 0% { -webkit-transform: rotate(-360deg) scale(0.1); } 100% { -webkit-transform: none; } } @-moz-keyframes 'rotate' { 0% { -moz-transform: rotate(-360deg) scale(0.1); } 100% { -moz-transform: none; } } @-ms-keyframes 'rotate' { 0% { -ms-transform: rotate(-360deg) scale(0.1); } 100% { -ms-transform: none; } } @-o-keyframes 'rotate' { 0% { -o-transform: rotate(-360deg) scale(0.1); } 100% { -o-transform: none; } } @keyframes 'rotate' { 0% { transform: rotate(-360deg) scale(0.1); } 100% { transform: none; } }
/*背景图旋转出现*/ .rotate:target{ <span style="white-space:pre"></span>z-index: 100; <span style="white-space:pre"></span>-webkit-animation-name: rotate; <span style="white-space:pre"></span>-webkit-animation-duration: 1s; <span style="white-space:pre"></span>-webkit-animation-iteration-count: 1; <span style="white-space:pre"></span>-moz-animation-name: rotate; <span style="white-space:pre"></span>-moz-animation-duration: 1s; <span style="white-space:pre"></span>-moz-animation-iteration-count: 1; <span style="white-space:pre"></span>-ms-animation-name: rotate; <span style="white-space:pre"></span>-ms-animation-duration: 1s; <span style="white-space:pre"></span>-ms-animation-iteration-count: 1; <span style="white-space:pre"></span>-o-animation-name: rotate; <span style="white-space:pre"></span>-o-animation-duration: 1s; <span style="white-space:pre"></span>-o-animation-iteration-count: 1; <span style="white-space:pre"></span>animation-name: rotate; <span style="white-space:pre"></span>animation-duration: 1s; <span style="white-space:pre"></span>animation-iteration-count: 1; }
0 0
- [css3]切换图片知识点
- 纯CSS3图片切换
- css3实现图片平滑切换
- 利用CSS3实现图片切换特效
- css3 transition hover图片样式切换
- 纯css3实现图片自动切换
- 原生js+css3实现图片自动切换,图片轮播
- CSS3知识点
- 20个超棒的CSS3图片切换&灯箱效果教程推荐
- 无js实现点击图片切换背景css3
- SVG和CSS3炫酷蹦床式图片切换效果
- 适合移动mobile的css3弹性堆叠图片切换特效
- css3+html+Jquery实现鼠标滑过图片切换效果
- CSS3 图片
- CSS3--图片
- html5 css3基础知识点
- css3小知识点收录
- CSS3知识点总结
- CF 278A Circle Line
- Rails
- pycaffe配置
- css缩写的主要规则
- mysql-主键和外键
- [css3]切换图片知识点
- Android 自定义View动画篇之基础
- 最短路径算法汇总
- 首日谈
- 世界谁会倾听你
- Intellij下创建Springmvc webapp(代码)
- Leetcode-106. Construct Binary Tree from Inorder and Postorder Traversal
- HDOJ2009
- mysql-表、ER图、索引与视图的基础操作