Html
    Css
    Js

    
                        
.main-boxs {
	position:absolute;
	top:0px;
	left:0px;
	right:0px;
	bottom:0px;
	background-color:#00040F;
}
.middle-box {
	width:400px;
	height:400px;
	position:relative;
	top:50%;
	left:50%;
	margin-left:-200px;
	margin-top:-200px;
	box-shadow:0px 0px 15px 1px rgba(255,255,255,0.89) inset;
}
.canvas-type {
	width:100%;
	height:100%;
	position:absolute;
}
.canvas-type canvas {
	width:100%;
	height:100%;
}

                        
↑上面代码改变,会自动显示代码结果 jQuery调用版本:2.1.1
 立即下载

canvas边框动画效果(原创)

更新时间:2019-10-13 23:17:42

canvas边框动画效果

html:

<div class="canvas-type">
  <canvas id="mycanvas1" width="800" height="400"></canvas>
</div>

js:

banneractive(document.getelementbyid("mycanvas1"));
0