HTML div截图? [英] HTML div to screenshot?
问题描述
这是我的问题:
我有一些东西,在jQuery中放置游戏,用户将一些项目(div与img)拖到可拖放的绘图区域。
我需要用户设计的截图,以便将所有设计成一个图库页面。
我的问题是如何将HTML代码转换为jpeg / png / gif / canvas / whatever。
Btw 。我在服务器端共享PHP托管。
你做错了。在JavaScript中始终存储每件作品的位置,然后提交该数据并根据传递的JavaScript数据重新构建图像/位置。
I tried to google it, but without much success.
Here is my problem:
I have something like a drag-and-drop game in jQuery, where the user drags some items (div with img) to the droppable drawing area.
I need a screenshot of the users design so I can put all designs into a gallery page.
My problem is how to get the HTML code into a jpeg/png/gif/canvas/whatever.
Btw. I'm on a shared PHP hosting on the server side.
You're doing it wrong. Store each piece's location at all times in javascript, and then just submit that data and re-build the images/locations based on the passed javascript data.
这篇关于HTML div截图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!