CSS3 过渡
来源:互联网 发布:onvifdiscovery java 编辑:程序博客网 时间:2024/04/27 19:36
CSS3 过渡属性
W3CSchool标准CSS使用语法*transition 属性针对不同浏览器兼容
div{transition: width 2s;-moz-transition: width 2s;/* Firefox 4 */-webkit-transition: width 2s;/* Safari 和 Chrome */-o-transition: width 2s;/* Opera */}注意:I E10、Firefox、Chrome 以及 Opera 支持 transition 属性;Safari 需要前缀 -webkit-。
html与css代码
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><!-- Always force latest IE rendering engine (even in intranet) & Chrome FrameRemove this if you use the .htaccess --><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><title>index</title><meta name="description" content=""><meta name="author" content="boonya"><meta name="viewport" content="width=device-width; initial-scale=1.0"><!-- Replace favicon.ico & apple-touch-icon.png in the root of your domain and delete these references --><link rel="shortcut icon" href="/favicon.ico"><link rel="apple-touch-icon" href="/apple-touch-icon.png"><style>div {width: 300px;height: 200px;background-color: #39B940;-moz-transition: width 2s,height 2s,-moz-transform 2s;//*向宽度、高度和转换添加过渡效果*//}div:hover{width: 600px;height: 400px;-moz-transform:rotate(180deg);}</style></head><body><div> <p>我是小妞妞。</p></div></body></html>
效果图
注:图片为静态,效果为动态,请参考网址http://www.w3school.com.cn/tiy/t.asp?f=css3_transition2
1 0
- css3过渡
- CSS3过渡
- css3过渡
- CSS3过渡
- CSS3过渡
- CSS3过渡
- <css3>过渡
- CSS3 过渡
- CSS3 过渡
- CSS3--过渡
- CSS3 过渡
- CSS3-过渡
- 【css3】过渡
- CSS3过渡
- CSS3-过渡
- CSS3过渡
- CSS3过渡
- CSS3过渡
- R的环境系统(汇总)
- vb.net 教程 1-3 数据类型:String 2
- 51nod 1001 数组中和等于K的数对
- aws 基本操作入门 (如何创建机器 如何扩容磁盘)
- android studio更新后出现错误
- CSS3 过渡
- 在VS2015下配置OpenCV3.2时遇到 fatal error LNK1112: 模块计算机类型“x64”与目标计算机类型“X86”冲突
- head body main article session time 这些元素有什么用
- PAT 1107. Social Clusters
- 关于使用springMVC时model.addAttribute("list",list)jsp页面无法使用EL表达式获取到值
- 【Java学习笔记】Java集合类总结
- Android 线程开发笔记
- 166. Fraction to Recurring Decimal
- bootstrap学习笔记(3)--less语言的简单实用