-
Notifications
You must be signed in to change notification settings - Fork 55
Expand file tree
/
Copy pathiframe.html
More file actions
71 lines (66 loc) · 1.7 KB
/
iframe.html
File metadata and controls
71 lines (66 loc) · 1.7 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html>
<html>
<head>
<title>Iframe rotation example</title>
<script src="../src/propeller.js"></script>
<style>
html, body {
margin-left: 50%;
margin-right: 50%;
font-family: Helvetica Neue, Helvetica, Arial;
font-weight: bold;
}
#propellerFrame {
margin-left: -202px;
margin-top: 40px;
width: 404px;
height: 843px;
background: url(./img/iphone.png) no-repeat;
}
.iframeContainer {
position: absolute;
width: 337px;
height: 595px;
left: 35px;
top: 125px;
background-color: #00A000;
}
.iphoneContent {
width: 100%;
height: 100%;
background-color: #ffffff;
}
.arrow {
position: absolute;
left: 5%;
top: 15%;
}
</style>
</head>
<body style="margin: auto auto">
<div class="arrow">
<img src="img/iphonearrow.png">
<p id="tip">
Try to rotate iPhone,<br> not it`s content
</p>
</div>
<div id="propellerFrame">
<div class="iframeContainer">
<iframe class="iphoneContent" src="http://www.pixelscommander.com/" ></iframe>
</div>
</div>
</body>
<script>
new Propeller('#propellerFrame', {
inertia: 0.95,
onrotate: function() {
if (window.iphonerotated === undefined) {
setTimeout(function(){
document.getElementById('tip').innerHTML = 'Now feel free to use content';
}, 500);
}
window.iphonerotated = true;
}
});
</script>
</html>