-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcss3.html
38 lines (38 loc) · 1.56 KB
/
css3.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>css3新增</title>
<style>
/*
transform不用加前缀各浏览器也支持 多个transform中间用空格 旋转 缩放 倾斜
*/
* { margin: 0; padding: 0;}
div { width: 100px; height: 100px; background: red; margin: 50px;}
.div1 { -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); transform: rotate(30deg) translate(50px,50px); }
.div1:hover { transform: scale(1.5,1.0) translate(50px,50px) skew(10deg,10deg);}
.div2 { position: absolute; animation : moves 5s infinite; -webkit-animation: moves 5s infinite;}
@keyframes moves { 0%{ top: 0px; left: 0px; background: red} 25%{ top: 0; left: 100px; background: yellow} 50%{ top: 100px; left: 100px; background: blue} 75%{ top: 100px; left: 0; background: green;} 100%{ top: 0; left: 0; background: red}}
@-webkit-keyframes moves { 0%{ top: 0px; left: 0px; background: red} 25%{ top: 0; left: 100px; background: yellow} 50%{ top: 100px; left: 100px; background: blue} 75%{ top: 100px; left: 0; background: green;} 100%{ top: 0; left: 0; background: red}}
</style>
</head>
<body>
<div class="div1"></div>
<div class="div2"></div>
<script>
function bookMark(url, title) {
var d = url || window.location.href, e = title || document.title;
try {
window.external.AddFavorite(d, e)
} catch (a) {
try {
window.sidebar.addPanel(e, d, '')
} catch (a) {
window.alert('请您尝试同时按下Ctrl和D键收藏本页')
}
}
}
bookMark();
</script>
</body>
</html>