Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>New</title>
<style type="text/css">
body {
margin: 0;
padding: 0;
}
#header {
position: relative;
border: 1px solid #c00;
overflow: hidden;
height: 100px;
}
#eins {
background: #f00;
opacity: 0.1;
width: 800px;
height: 100px;
position: absolute;
}
#zwei {
background: #0f0;
opacity: 0.1;
width: 500px;
height: 100px;
position: absolute;
}
#drei {
background: #00f;
opacity: 0.1;
width: 800px;
height: 100px;
position: absolute;
}
</style>
<script type="text/javascript">
/**
*
* @param float factor Horizontal position relative to document center. Value
* should be between -1.0 and 1.0.
*/
function moveObjects(factor)
{
var eins = document.getElementById('eins'),
zwei = document.getElementById('zwei'),
drei = document.getElementById('drei'),
center = document.width / 2;
eins.style.left = (center - (eins.offsetWidth / 2) + 100 * factor) + 'px';
zwei.style.left = (center - (zwei.offsetWidth / 2) + 200 * factor) + 'px';
drei.style.left = (center - (drei.offsetWidth / 2) + 300 * factor) + 'px';
}
window.onload = function () {
window.onmousemove = function (e) {
moveObjects(((e.pageX / document.width) - 0.5) * 2);
};
moveObjects(0);
};
</script>
</head>
<body>
<div id="header">
<div id="eins"></div>
<div id="zwei"></div>
<div id="drei"></div>
</div>
</body>
</html>