[英]How can I make different shapes of a canvas draggable and particular area of it droppable in the same canvas
[英]How can i make my canvas area fit to the iphone browser?
我使用 HTML5 創建了一個游戲。 canvas 尺寸為 320x480。 當網頁在 iphone 的瀏覽器中打開時,canvas 區域將位於瀏覽器的左上角,除非我放大它,否則我無法玩游戲。 我能做什么..請幫忙。 謝謝。
您需要將視口的元標記設置為 iPhone 屏幕的大小。
<meta name="viewport" content="width=device-width; height=device-height; initial-scale=1.0; maximum-scale=1.0;"/>
這將正確縮放頁面,因此您不必首先放大,並且會阻止用戶在頁面打開后縮放。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.