Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Web page</title>
<style type="text/css">
#black {
background: black;
position: absolute;
top: 0;
left: 0;
display: none;
}
#cont {
position: absolute;
display: none;
background: white;
width: 200px;
height: 200px;
z-index: 1;
}
</style>
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<script type="text/javascript">
$(function() {
var width = $(document).width();
var height = $(document).height();
var c_width = $('#cont').width();
var c_height = $('#cont').height();
$('#show').click(function(e) {
e.preventDefault();
$('#black').css({'width' : width, 'height' : height}).fadeIn(1000);
$('#cont').css({'left' : (width / 2) - (c_width / 2), 'top' : (height / 2) - (c_height / 2)}).fadeIn(1000);
});
$('#close').click(function() {
$('#black').fadeOut(500);
$('#cont').fadeOut(500);
});
});
</script>
</head>
<body>
<div id="black"></div>
<a href="#" id="show">Show the content</a>
<div id="cont">
asdasasdfasd fsda fads<br />
asdfadsfdas
<?php include('file.php'); ?>
<a href="#" style="position: absolute; top: 170px; left: 160px;" id="close">Close</a>
</div>
</body>
</html>