Skip to content

Commit 29ef491

Browse files
committed
feat: replace tag a with button
1 parent 2162381 commit 29ef491

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

Diff for: src/app/shared/contact-old.service.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/*
2+
* 此文件使用的是老的http模块,现已废弃不用
3+
*/
14
import { Injectable } from '@angular/core';
25
import { Http, RequestOptions, Headers, Response } from '@angular/http';
36
import { Observable } from 'rxjs/Observable';

Diff for: src/app/shared/footer.component.css

+7-5
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,18 @@ nav{
77
background-color: #ffffff;
88
border-top: 1px solid #3DD689;
99
}
10-
nav a{
10+
nav button {
11+
border: 0;
1112
float: left;
1213
width: 50%;
1314
height: 35px;
1415
text-decoration: none;
1516
position: relative;
1617
overflow: hidden;
18+
background-color: #FFF;
1719
}
1820

19-
nav a i {
21+
nav button i {
2022
display: block;
2123
height: 35px;
2224
line-height: 35px;
@@ -25,11 +27,11 @@ nav a i {
2527
text-align: center;
2628
}
2729

28-
nav a.clickOn{
30+
nav button.clickOn{
2931
background-color: #3DD689;
3032
}
3133

32-
nav a.clickOn i {
34+
nav button.clickOn i {
3335
color: #ffffff;
3436
}
3537
nav em {
@@ -44,7 +46,7 @@ nav em {
4446
margin-top: -5px;
4547
opacity: 0;
4648
}
47-
/*nav a.btn-click em{
49+
/*nav button.btn-click em{
4850
-webkit-animation: scale_zoom 1s both infinite;
4951
}
5052

Diff for: src/app/shared/footer.component.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<nav>
2-
<a [routerLink]=" ['/collection'] " [ngClass]="{clickOn: !isListPage}">
2+
<button [routerLink]=" ['/collection'] " [ngClass]="{clickOn: !isListPage}">
33
<i>收藏</i>
4-
</a>
5-
<a [routerLink]=" ['/list']" [ngClass]="{clickOn: isListPage}">
4+
</button>
5+
<button [routerLink]=" ['/list']" [ngClass]="{clickOn: isListPage}">
66
<em></em>
77
<i>通讯录</i>
8-
</a>
8+
</button>
99
</nav>

0 commit comments

Comments
 (0)