全宽帆布动画

时间:2016-04-16 11:19:23

标签: javascript html5 canvas html5-canvas

请帮我看一下'画布'动画 以下是示例:http://codepen.io/anon/pen/jqxVOR?editors=0010

如何使全屏和(最重要的)不像素化?

以下代码:

function doAction() {
    the_id = $(this).attr('data');
}

$(document).on ("click", ".submit", doAction);

$(document).on ("mouseover", ".edit", doAction);

$(document).on ("mouseout", ".avoid", doAction);

1 个答案:

答案 0 :(得分:-1)

对于全屏我使用这种风格:

<style>
    html, document, body {
        width: 100%;
        height: 100%;
        margin: 0px;
        border: 0;
        overflow: hidden; /*  Disable scrollbars */
        display: block;  /* No floating content on sides */
    }
    #c {
      position: fixed; left: 0px; top: 0px;
    }

</style>

我使用id为'c'的canvas元素:

 <canvas id='c'>

我分叉你的codepen: http://codepen.io/anon/pen/PNebmy

关于像素:我不确定,但不是像等离子体一样的pixeley效应?