html5 canvas首屏自适应背景动画循环效果怎么插入
展开全部
以demo为例
<!--必要样式-->
<link rel="stylesheet" type="text/css" href="css/component.css" />
<!--[if IE]>
<script src="js/html5.js"></script>
<![endif]-->
</head>
<body>
<div class="container demo-4">
<div class="content">
<div id="large-header" class="large-header">
<canvas id="demo-canvas"></canvas>
<h1 class="main-title">Morning Light</span></h1>
</div>
<nav class="codrops-demos">
<a href="index.html">Demo 1</a>
<a href="index2.html">Demo 2</a>
<a href="index3.html">Demo 3</a>
<a class="current-demo" href="index4.html">Demo 4</a>
</nav>
</div>
</div><!-- /container -->
<script src="js/rAF.js"></script>
<script src="js/demo-4.js"></script>
只要有必要的CSS样式文件 和相应的div再有JS文件就可以了
<!--必要样式-->
<link rel="stylesheet" type="text/css" href="css/component.css" />
<!--[if IE]>
<script src="js/html5.js"></script>
<![endif]-->
</head>
<body>
<div class="container demo-4">
<div class="content">
<div id="large-header" class="large-header">
<canvas id="demo-canvas"></canvas>
<h1 class="main-title">Morning Light</span></h1>
</div>
<nav class="codrops-demos">
<a href="index.html">Demo 1</a>
<a href="index2.html">Demo 2</a>
<a href="index3.html">Demo 3</a>
<a class="current-demo" href="index4.html">Demo 4</a>
</nav>
</div>
</div><!-- /container -->
<script src="js/rAF.js"></script>
<script src="js/demo-4.js"></script>
只要有必要的CSS样式文件 和相应的div再有JS文件就可以了
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询