JSDM

HTML

 
1
<div id = 'snowy'></div>
2
<canvas id = 'canv'  width="480" height="640"></canvas>
3
4

CSS

xxxxxxxxxx
34
 
1
body { 
2
  background-image:url('http://www.clipartpal.com/_thumbs/pd/holiday/christmas/Christmas_card_Santa_moon.png'); 
3
  background-size:100% 100%; 
4
  height:100vh;
5
  background-repeat: no-repeat;
6
  overflow:hidden;
7
  margin:0;
8
  width:100%;
9
}
10
canvas{
11
  position:absolute;
12
  bottom:-5em;
13
  left:20vw;
14
  z-index:1;
15
}
16
#snowy{
17
  background: none;
18
  background-image: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/131045/snow1.png'),
19
 url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/131045/snow2.png'), 
20
 url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/131045/snow3.png');
21
  height: 100%;
22
  left: 0;
23
  position: absolute;
24
  top: 0;
25
  width: 100%;
26
  z-index:2;
27
  animation: snowy 15s linear infinite;
28
}
29
@keyframes snowy {
30
  0% {background-position: 0px 0px, 0px 0px, 0px 0px;}
31
  50% {background-position: 500px 500px, 100px 200px, -100px 150px;}
32
  100% {background-position: 500px 1000px, 200px 400px, -100px 300px;}
33
}
34
? ?
? ?
必须是有效的URL
+ 添加另一个资源

JS

xxxxxxxxxx
31
 
1
// 0. 如果使用模块化机制编程,导入Vue和VueRouter,要调用 Vue.use(VueRouter)
2
3
// 1. 定义 (路由) 组件。
4
// 可以从其他文件 import 进来
5
const Foo = { template: '<div>foo</div>' }
6
const Bar = { template: '<div>bar</div>' }
7
8
// 2. 定义路由
9
// 每个路由应该映射一个组件。 其中"component" 可以是
10
// 通过 Vue.extend() 创建的组件构造器,
11
// 或者,只是一个组件配置对象。
12
// 我们晚点再讨论嵌套路由。
13
const routes = [
14
  { path: '/foo', component: Foo },
15
  { path: '/bar', component: Bar }
16
]
17
18
// 3. 创建 router 实例,然后传 `routes` 配置
19
// 你还可以传别的配置参数, 不过先这么简单着吧。
20
const router = new VueRouter({
21
  routes // (缩写) 相当于 routes: routes
22
})
23
24
// 4. 创建和挂载根实例。
25
// 记得要通过 router 配置参数注入路由,
26
// 从而让整个应用都有路由功能
27
const app = new Vue({
28
  router
29
}).$mount('#app')
30
31
// 现在,应用已经启动了!
必须是有效的URL
+ 添加另一个资源
Close

文件管理 点击文件查看URL

图片

  1. 暂无文件

CSS

  1. 暂无文件

JavaScript

  1. 暂无文件

其他

  1. 暂无文件
拖动文件到上面的区域或者:
加载中 ..................