1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5<style type="text/css">
6.classname {
7 -webkit-animation-name: cssAnimation;
8 -webkit-animation-duration:3s;
9 -webkit-animation-iteration-count: 1;
10 -webkit-animation-timing-function: ease;
11 -webkit-animation-fill-mode: forwards;
12}
13@-webkit-keyframes cssAnimation {
14 from {
15 -webkit-transform: rotate(0deg) scale(1) skew(0deg) translate(100px);
16 }
17 to {
18 -webkit-transform: rotate(0deg) scale(2) skew(0deg) translate(100px);
19 }
20}
21</style>
22<script type="text/javascript">
23 function ani(){
24 document.getElementById('img').className ='classname';
25 }
26</script>
27<title>Untitled Document</title>
28</head>
29
30<body>
31<input name="" type="button" onclick="ani()" />
32<img id="img" src="clogo.png" width="328" height="328" />
33</body>
34</html>
1<!DOCTYPE html>
2<html>
3<head>
4<meta name="viewport" content="width=device-width, initial-scale=1">
5<style>
6.button {
7 padding: 15px 25px;
8 font-size: 24px;
9 text-align: center;
10 cursor: pointer;
11 outline: none;
12 color: #fff;
13 background-color: #4CAF50;
14 border: none;
15 border-radius: 15px;
16 box-shadow: 0 9px #999;
17}
18
19.button:hover {background-color: #3e8e41}
20
21.button:active {
22 background-color: #3e8e41;
23 box-shadow: 0 5px #666;
24 transform: translateY(4px);
25}
26</style>
27</head>
28<body>
29
30<h2>Animated Buttons - "Pressed Effect"</h2>
31
32<button class="button">Click Me</button>
33
34</body>
35</html>
36
1.btn {
2 background-color: #ddd;
3 border: none;
4 color: black;
5 padding: 16px 32px;
6 text-align: center;
7 font-size: 16px;
8 margin: 4px 2px;
9 transition: 0.3s;
10}
11
12.btn:hover {
13 background-color: #3e8e41;
14 color: white;
15}