0

我正在开发一个 windows phone html5 应用程序。我在我的代码中使用了一个画布标签。但是我收到一个错误,说 canvas 是一个无效的孩子。任何有关如何解决此问题的想法将不胜感激

我的代码如下所示:

 <div class="imagebox">
        <canvas id="canvas" height="500px" width="500px" style="width: 500px; height: 500px; border: solid 1pt black; margin-top: 15px;">
        </canvas>
</div>

显示的错误是:

The element 'div' in namespace 'http://www.w3.org/1999/xhtml' has invalid child element 'canvas' in namespace 'http://www.w3.org/1999/xhtml'. List of possible elements expected: 'p, h1, h2, h3, h4, h5, h6, div, ul, ol, dl, pre, hr, blockquote, address, fieldset, table, form, a, br, span, bdo, map, object, img, tt, i, b, big, small, em, strong, dfn, code, q, samp, kbd, var, cite, abbr, acronym, sub, sup, input, select, textarea, label, button, noscript, ins, del, script' in namespace 'http://www.w3.org/1999/xhtml'.
4

0 回答 0