質問編集履歴

3

コードを追記しました。

2017/07/29 10:14

投稿

ko20vonobird
ko20vonobird

スコア50

test CHANGED
File without changes
test CHANGED
@@ -52,7 +52,105 @@
52
52
 
53
53
  ```
54
54
 
55
+ 以下問題とは関係のない部分を取り去った最小限の追記HTMLコードになります。
55
56
 
57
+ ```HTML
58
+
59
+ <!DOCTYPE HTML>
60
+
61
+ <html>
62
+
63
+ <head>
64
+
65
+ <title>Title</title>
66
+
67
+ <link rel="stylesheet" type="text/css" href="truth.css">
68
+
69
+ <script type="text/javascript" src="jquery-3.2.1.min.js"></script>
70
+
71
+ <script src="https://code.createjs.com/createjs-2015.11.26.min.js"></script>
72
+
73
+ </head>
74
+
75
+ <body>
76
+
77
+ <div id="ofallparent" style="position:relative">
78
+
79
+ <canvas id="allparent"></canvas>
80
+
81
+ </div>
82
+
83
+ <script type="text/javascript">
84
+
85
+ window.onload = function(){
86
+
87
+ var stage = new createjs.Stage('allparent');
88
+
89
+ var canvas = document.getElementById('allparent');
90
+
91
+ var wid = stage.canvas.width = screen.availWidth;
92
+
93
+ var hei = stage.canvas.height = screen.availHeight;
94
+
95
+ if (canvas && canvas.getContext) {
96
+
97
+ var ctx = canvas.getContext('2d');
98
+
99
+ ctx.beginPath();
100
+
101
+ ctx.fillStyle = 'rgb(0, 0, 0)';
102
+
103
+ ctx.fillRect(0, 0, wid, hei);
104
+
105
+ ma();
106
+
107
+ }
108
+
109
+ function ma() {
110
+
111
+ var topzahyo = (hei*13)/14;
112
+
113
+ var leftzahyo = (wid/2) - (wid/11);
114
+
115
+ var widdis = wid/7;
116
+
117
+ var heidis = hei/7;
118
+
119
+ var topto = (hei*11)/14;
120
+
121
+ $("#ofallparent").append('<div id="monitor"></div>');
122
+
123
+ $("#monitor").css({'top':topzahyo+'px','left':leftzahyo+'px', 'width"':widdis+'px', 'height':'0px', 'background-color':'#ffffff', 'position':'absolute'});
124
+
125
+ $("#monitor").animate({height:heidis+'px', top:topto+'px'});
126
+
127
+ }
128
+
129
+ }
130
+
131
+ </script>
132
+
133
+ </body>
134
+
135
+ </html>
136
+
137
+ ```
138
+
139
+ ```css
140
+
141
+ body {
142
+
143
+ margin-left:0px;
144
+
145
+ margin-top:0px;
146
+
147
+ margin-right:0px;
148
+
149
+ margin-bottom:0px;
150
+
151
+ }
152
+
153
+ ```
56
154
 
57
155
  ###試したこと
58
156
 

2

タイトルを簡潔にしました

2017/07/29 10:14

投稿

ko20vonobird
ko20vonobird

スコア50

test CHANGED
@@ -1 +1 @@
1
- divにappendid付きのdivを追加して動的に設定を施したのですが反映されません
1
+ canvasにdivを重ねのですが、うくいきません
test CHANGED
File without changes

1

文の修正。

2017/07/29 09:02

投稿

ko20vonobird
ko20vonobird

スコア50

test CHANGED
File without changes
test CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  ```
24
24
 
25
- monitorappear()は別の関数から呼ばれるようになっています。
25
+
26
26
 
27
27
  ```javascript
28
28
 
@@ -77,3 +77,5 @@
77
77
  使用しているjquery:jquery-3.2.1.min.js
78
78
 
79
79
  position:relativeにすると、重ならず、下に表示されます。
80
+
81
+ monitorappear()は別の関数から呼ばれるようになっています。