Skip to content

Commit 25baa64

Browse files
committed
1.基本完成动画自定义逻辑
1 parent 1a161f3 commit 25baa64

File tree

11 files changed

+90
-12
lines changed

11 files changed

+90
-12
lines changed

app/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<link rel="stylesheet" href="bower_components/highlightjs/styles/default.css" />
2424
<link rel="stylesheet" href="bower_components/select2/select2.css" />
2525
<link rel="stylesheet" href="bower_components/nvd3/src/nv.d3.css" />
26+
<link rel="stylesheet" href="bower_components/animate.css/animate.css" />
2627
<!-- endbower -->
2728
<!-- endbuild -->
2829
<!-- build:css({.tmp,app}) styles/main.css -->

app/scripts/config/authors.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,10 @@ angular.module('ngShowcaseApp').constant('authors', [
3030
name: 'why520crazy',
3131
email: 'why520crazy@163.com',
3232
github: 'https://github.com/why520crazy'
33+
},
34+
{
35+
name:'Leonardo',
36+
email:'wang861622836@163.com',
37+
github:'https://github.com/wleonardo'
3338
}
3439
]);

app/scripts/config/nav-data.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,9 @@ angular.module('ngShowcaseApp').constant('NavData', [
293293
},
294294
{
295295
state: 'animation.custom',
296-
label: '自定义'
296+
label: '自定义',
297+
authors: ['Leonardo'],
298+
progress: 30
297299
}
298300
]
299301
},
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[{"r1": [{
2+
"temLink":"00",
3+
"imageLink":"",
4+
"itemPrice":"",
5+
"itemLink":"","
6+
itemName":""
7+
}]
8+
}
9+
{ "r2": [ {
10+
"temLink":"10",
11+
"imageLink":"",
12+
"itemPrice":"",
13+
"itemLink":"",
14+
"itemName":""}]
15+
}
16+
]
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
'use strict';
22

3-
angular.module('ngShowcaseApp').controller('ctrl.animation.custom', function ($scope) {
3+
angular.module('ngShowcaseApp').controller('ctrl.animation.custom', function ($scope,$http) {
44
var vm = $scope.vm = {};
5+
$scope.choice = "";
6+
$scope.classname = "";
7+
$scope.choiceitems = {};
8+
$scope.change = function(){
9+
$scope.classname = $scope.choice+" "+"animated";
10+
};
511
});
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[{"r1": [{
2+
"temLink":"00",
3+
"imageLink":"",
4+
"itemPrice":"",
5+
"itemLink":"","
6+
itemName":""
7+
}]
8+
}
9+
{ "r2": [ {
10+
"temLink":"10",
11+
"imageLink":"",
12+
"itemPrice":"",
13+
"itemLink":"",
14+
"itemName":""}]
15+
}
16+
]

app/views/animation/custom.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.title{
2+
color: #f35626;
3+
background-image: -webkit-linear-gradient(92deg,#f35626,#feab3a);
4+
-webkit-background-clip: text;
5+
-webkit-text-fill-color: transparent;
6+
margin-bottom: 20px;
7+
line-height: 50px;
8+
}

app/views/animation/custom.html

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,23 @@
1-
<div ui-view></div>
1+
<link rel="stylesheet" href="views/animation/custom.css"/>
2+
<center><h1 class="title {{classname}}">AngularJs</h1></center>
3+
<select class="form-control" ng-model="choice" ng-change="change()">
4+
<option>bounce</option>
5+
<option>flash</option>
6+
<option>pulse</option>
7+
<option>rubberBand</option>
8+
<option>shake</option>
9+
</select>
10+
11+
12+
13+
<h3>说明</h3>
14+
<ul>
15+
<li>
16+
采用了第三方css类库Animate.css,具体信息以及参数请参考
17+
<a href="http://daneden.github.io/animate.css/" target="_blank">官方文档</a>
18+
19+
</li>
20+
<li>
21+
通过ng-model来实时修改classname
22+
</li>
23+
</ul>

app/views/home/about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
</tr>
2626
<tr>
2727
<th>程序员</th>
28-
<td>雪狼, Ken, zxsoft, why520crazy, playing,天猪</td>
28+
<td>雪狼, Ken, zxsoft, why520crazy, playing,天猪,Leonardo</td>
2929
<td>只列出有提交的部分,随时增补</td>
3030
</tr>
3131
<tr>

bower.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"angular-tree-repeat": "~0.0.1",
2323
"d3": "~3.4.8",
2424
"angularjs-nvd3-directives": "~0.0.7",
25-
"highcharts-release": "~3.0.7"
25+
"highcharts-release": "~3.0.7",
26+
"animate.css":"~3.3.0"
2627
},
2728
"devDependencies": {
2829
"angular-mocks": "1.2.15",

0 commit comments

Comments
 (0)