-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
78 lines (62 loc) · 1.74 KB
/
index.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
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
72
73
74
75
76
77
78
<!DOCTYPE html>
<html>
<head>
<title>Desi Meme Generator</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/Dark_meme.css" />
<link rel="stylesheet" href="css/jquery_mobile_icons.css" />
<link rel="stylesheet" href="css/jquery_mobile_structure.css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
</script>
<script type="text/javascript" src="js/jquery_mobile.js"></script>
<style>
body{
text-transform:capitalize;
}
#container{
position: relative;
}
#myCanvas{
border: 2px solid red;
position: absolute;
width: 100%;
}
</style>
</head>
<body>
<div id="index" data-role="page">
<div data-role="header">
<h1>Page Title</h1>
</div><!-- /header -->
<div data-role="content" >
<div id="container">
<canvas id="myCanvas"></canvas>
</div>
<input id="toptext" type="text">
</div><!-- /content -->
<div data-role="footer">
<h4>Page Footer</h4>
</div><!-- /footer -->
</div><!-- /page -->
<script type="text/javascript">
$(document).ready(function(){
var context2= $("#myCanvas")[0].getContext('2d');
$("#myCanvas,#container").height((3*window.innerWidth)/4);
context2.fillStyle = "#0000ff";
context2.fillRect(0,0,context2.canvas.width,context2.canvas.height);
$("#toptext").on("keyup",function(){
// console.log($(this).val());
context2.save();
var topTxt=$(this).val();
context2.clearRect (0,0,context2.canvas.width,context2.canvas.height);
context2.fillRect(0,0,context2.canvas.width,context2.canvas.height);
context2.fillStyle = "#ffffff";
context2.fillText(topTxt,50,50,100,100);
context2.restore();
});
});
</script>
</body>
</html>