javascript - div to image to download -
i have problem puting div in image. thing want make div downloadable (right click, download image or on button). div want "downloadable"
<div style="display: block; background-color: transparent; background-repeat: no-repeat; background-image: url("images/fujairah-plates.png"); background-size: contain; min-height: 90px;" class="" id="plate"> <div id="plate2"></div> <div class="letter-left draw_code" id="draw_code"> b</div> <div class="letter-right draw_num" id="draw_num"> </div></div>
i hope constructive suggestions.
you can use html2canvas js library convert html canvas , after that, can export canvas data uri using todatauri() javascript function. data uri string can presented downloadable image. p. s: i've tried , works perfectly. ☺
Comments
Post a Comment