Justin's Words


  • Home

  • About

  • Archives
Justin's Words

Angular-UI-Router 学习笔记

Posted on 2014-10-15 | In Front-End |

为什么用 Route

  • AJAX 请求不会留下 History 记录
  • 用户无法直接通过 URL 进入应用中的指定页面(保存书签、链接分享给朋友)
  • AJAX 对 SEO 是个灾难
Read more »
Justin's Words

Anchor 平滑滚动

Posted on 2014-09-24 | In Front-End |

原代码出自 CSS-Tricks

1
2
3
4
5
6
7
8
9
10
11
12
13
14
$(function () {
$('a[href*=#]:not([herf=#])').click(function(event) {
if(location..pathname.replace(/^\//) == this.pathname.replace(/^\//) && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
if (target.length) {
$('html, body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
}
}
});
})
Justin's Words

自学 PHP,如何不走弯路?

Posted on 2014-09-08 | In PHP |

这个问题来自知乎,我觉得下面回答不错,于是贴过来。

Read more »
Justin's Words

MOTO X 2nd Gen. 出了!

Posted on 2014-09-05 | In NoneTech |

MOTO X 2nd Gen. 出了!!!啊啊啊中毒!!!

来自 the Verge 的上手视频

Justin's Words

作品:Canvas 画了个球(美术渣)

Posted on 2014-08-29 | In Front-End |

球在下面!


Your browser doesn’t support canvas.
Justin's Words

开源技术构建 Web App 架构-Paracutin-豌豆荚

Posted on 2014-08-26 | In Front-End |
Justin's Words

AngularJS phonecat 完成

Posted on 2014-08-25 | In Front-End |

按照 AngularJS 官方教程 把 phonecat App 完成了,但从 step 11 就不知道各个步骤为什么要这么做了(:3」∠),主要是 Angular Animate。
phonecatApp.png

Justin's Words

视差滚动作业

Posted on 2014-08-25 | In Front-End |

今天的视差滚动作业,使用的是 fullPage.js

Justin's Words

AngularJS 制作 F1 车手积分 App

Posted on 2014-08-22 | In Front-End |

AngularJS 制作 F1 车手积分 App

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>F1 Feed App</title>
</head>
<body ng-app="F1FeedApp" ng-controller="driverController">
<table>
<thead style="position: fixed; background-color: white">
<tr>
<th colspan="4">Drivers Championship Standings</th>
</tr>
<tr>
<th colspan="4">Search: <input type="text" ng-model="name"></th>
</tr>
</thead>
<tbody>
<tr><td colspan="4">&amp;nbsp;</td></tr>
<tr><td colspan="4">&amp;nbsp;</td></tr>
<tr ng-repeat="driver in driversList | filter:name">
<td>{ { $index + 1 }}</td>
<td>
{ {driver.Driver.givenName + " " + driver.Driver.familyName}}
</td>
<td>{ {driver.Constructors[0].name}}</td>
<td>{ {driver.points}}</td>
</tr>
</tbody>
</table>
</body>
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/angular/angular.min.js"></script>
<script>
var app = angular.module("F1FeedApp", []);
app.controller("driverController", function($scope, $http){
$http.get("http://ergast.com/api/f1/2013/driverStandings.json")
.success(function(response) {
$scope.driversList = response.MRData.StandingsTable.StandingsLists[0].DriverStandings;
});
});
</script>
</body>
</html>
Justin's Words

前端面试试题

Posted on 2014-08-21 | In Front-End |

以下是我在 Github 上看到的一些前端面试试题,发出来提醒自己。

2014年最新前端开发面试题 (题目列表页)

目录

  1. 前言
  2. HTML 部分
  3. CSS 部分
Read more »
1…891011
Justin Young

Justin Young

You Deserve A Better Life

107 posts
15 categories
54 tags
RSS
Github Twitter
© 2014 - 2019 Justin Young
Powered by Hexo
Theme - NexT.Mist