1 decade ago by tangxuanli
I want to create one picture as button. also want to make sure game canvas will fulfill the whole screen.
but when I make the canvas width is 100%.the mouse.x will be moved.
how can I resolve this issue?
1:fulfill the screen automatically
2:mouse.x will not be changed.?
please help me urgently..thanks
#canvas {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
width:100%;
height:100%;
margin: auto;
background-color: #98F5FF;
color: #98F5FF;
border: 1px solid #555;
background-position:0% 0%;
}
but when I make the canvas width is 100%.the mouse.x will be moved.
how can I resolve this issue?
1:fulfill the screen automatically
2:mouse.x will not be changed.?
please help me urgently..thanks
#canvas {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
width:100%;
height:100%;
margin: auto;
background-color: #98F5FF;
color: #98F5FF;
border: 1px solid #555;
background-position:0% 0%;
}