Skip to content

Commit f6b0ec7

Browse files
committed
修改二维码循环为CSS动画
1 parent c47ce01 commit f6b0ec7

File tree

5 files changed

+50
-24
lines changed

5 files changed

+50
-24
lines changed

css/phone.css

+25-17
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
font-size: 20px;
117117
width: 230px;
118118
}
119-
#voiceBtn {
119+
#searchVoiceBtn {
120120
float: right;
121121
padding: 12px 5px 5px 5px;
122122
border-bottom: 2px solid #4f8643;
@@ -272,21 +272,6 @@
272272
width: 100px;
273273
}
274274
/*
275-
搜索页面
276-
*/
277-
#inputSearch {
278-
font-size: 20px;
279-
width: 175px;
280-
}
281-
#tipIcons a {
282-
float: left;
283-
margin: 30px 1%;
284-
}
285-
#tipIcons p {
286-
font-size: 10px;
287-
width: 40px;
288-
}
289-
/*
290275
通讯录页面
291276
*/
292277
#a-z {
@@ -393,7 +378,7 @@
393378
#toolBar h3 {
394379
font-size: 20px;
395380
}
396-
.topRightBtn{
381+
#toolBar img{
397382
padding: 5px 20px 10px 20px;
398383
}
399384
#gobackBtn {
@@ -472,4 +457,27 @@
472457
font-size: 10px;
473458
top: -30px;
474459
}
460+
/*
461+
搜索页面
462+
*/
463+
#inputSearch {
464+
font-size: 20px;
465+
width: 170px;
466+
height: 31px;
467+
line-height: 36px;
468+
}
469+
img#searchIcon{
470+
padding: 3px 0;
471+
}
472+
img#searchVoiceBtn {
473+
padding: 6px 5px 0px 5px;
474+
}
475+
#tipIcons a {
476+
float: left;
477+
margin: 30px 1%;
478+
}
479+
#tipIcons p {
480+
font-size: 10px;
481+
width: 40px;
482+
}
475483
}

css/scan2D.css

+23-1
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,31 @@
5454
}
5555
#scrollBar{
5656
width: 100%;
57-
bottom: 100%;
57+
-webkit-animation: scan2D 1.5s infinite;
58+
-o-animation: scan2D 1.5s infinite;
59+
animation: scan2D 1.5s infinite;
5860
}
5961
#botBar img {
6062
width: 40px;
6163
height: 40px;
64+
}
65+
@-webkit-keyframes scan2D {
66+
from {bottom:100%;}
67+
to {bottom:0;}
68+
}
69+
@-moz-keyframes scan2D {
70+
from {bottom:100%;}
71+
to {bottom:0;}
72+
}
73+
@-ms-keyframes scan2D {
74+
from {bottom:100%;}
75+
to {bottom:0;}
76+
}
77+
@-o-keyframes scan2D {
78+
from {bottom:100%;}
79+
to {bottom:0;}
80+
}
81+
@keyframes scan2D {
82+
from {bottom:100%;}
83+
to {bottom:0;}
6284
}

js/contacts.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
var srcEle;//保存被长按的元素
2+
,isMove;
23
$(function () {
34
$("#toolBar, #slideMenu").bind("mousedown touchstart", backgroundColor1);//点击添加与搜索按钮后变色
45
$("#popMenu, #newFriends").bind("mousedown touchstart", "#D6D6D6", backgroundColor2);//点击变色
@@ -13,6 +14,6 @@ $(function () {
1314
});
1415
$("#bottomBar").bind("click touchend", bottomHref);//底栏导航
1516
$("#contactsList").bind("mousedown touchstart", longClick);//长按列表弹出菜单
16-
$("#shade").bind("click touchend", getOut);//点击背景退出菜单
1717
$("#contactsList").bind("click", enterPerson);//单击进入聊天窗口
18+
$("#shade").bind("click touchend", getOut);//点击背景退出菜单
1819
});

js/scan2D.js

-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ $(function () {
44
$("#gobackBtn").bind("click touchend", goBack);//返回按钮
55
$("#menuBtn").bind("click", slideMenu);//点击右上角菜单
66
$("#botBar").bind("click touchend", changeImg);//点击改变扫描框大小
7-
cycleScan();//循环扫描二维码动画
87
});

js/util.js

-4
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,6 @@ function changeShake (event) {//切换摇一摇目标
120120
src.setAttribute("src", './img/' + src.id + '2.jpg');
121121
$("#toolBar h4").html(src.getAttribute('alt'));
122122
}
123-
function cycleScan () { //循环扫描二维码动画
124-
$("#scrollBar").css("bottom", "100%");
125-
$("#scrollBar").animate({bottom:'0'}, 1500, cycleScan);
126-
}
127123
function changeImg (e) {//点击改变扫描框大小
128124
var src = e.target,
129125
srcParent = $("#botBar img");

0 commit comments

Comments
 (0)