I take a div within a canvas element like following:
<canvas>
<div></div>
</canvas>
Here both of them has height and width. But here I can’t see the div!
Is it not possible to take a div or p within a canvas?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You cannot place elements inside a canvas (and have both displayed); they are only displayed if the browser does not understand the canvas element.
If you would like to position elements over the same area as a canvas, here is one technique (among many) that would let you do it:
HTML
CSS
Here’s another technique, which lets the content of the div flow normally and makes the canvas a background to the content:
CSS