Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SURPRISED
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
华国豪
SURPRISED
Commits
69ba8ff0
Commit
69ba8ff0
authored
Jan 14, 2020
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
兼容rem的新js
parent
9d189550
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
32 deletions
+64
-32
AnnuaLmeetingHome.html
html/annualMeeting/AnnuaLmeetingHome.html
+4
-2
HitMouse.html
html/annualMeeting/HitMouse.html
+1
-1
MyPrize.html
html/annualMeeting/MyPrize.html
+5
-1
autosize2.js
js/autosize2.js
+54
-28
No files found.
html/annualMeeting/AnnuaLmeetingHome.html
View file @
69ba8ff0
...
...
@@ -47,7 +47,7 @@
</div>
<div
class=
"barrage"
>
<div
class=
"bar_input"
>
<input
type=
"text"
placeholder=
"发弹幕参与大屏互动"
>
<input
type=
"text"
placeholder=
"发弹幕参与大屏互动
(限20字数)"
maxlength=
"20
"
>
</div>
<div
class=
"send_btn"
onclick=
"sendMsg(1)"
>
<p>
发送
</p>
...
...
@@ -190,6 +190,8 @@
}
function
getMsg
()
{
//年会首页菜单
...
...
@@ -245,7 +247,7 @@
});
//嘉宾数量
proxy
.
on
(
'updateU
sers
OnlineCount'
,
function
(
data
)
{
proxy
.
on
(
'updateU
SERS
OnlineCount'
,
function
(
data
)
{
$
(
".rNumber"
).
html
(
data
)
})
}
...
...
html/annualMeeting/HitMouse.html
View file @
69ba8ff0
...
...
@@ -23,7 +23,7 @@
<div
class=
"top"
>
<div
class=
"top_title"
>
<img
src=
"../../images/aM/home.png"
alt=
""
class=
"return"
>
<p>
打老鼠
</p>
<p>
瑞鼠迎福
</p>
<img
src=
"../../images/aM/ranging.png"
alt=
""
class=
"ranging"
>
</div>
<div
class=
"top_data"
>
...
...
html/annualMeeting/MyPrize.html
View file @
69ba8ff0
...
...
@@ -141,6 +141,10 @@
background-size
:
100%
100%
;
background-repeat
:
no-repeat
;
}
.copy2
{
width
:
0.65rem
;
height
:
0.23rem
;
}
.box_r
p
{
color
:
#B31D2E
;
font-size
:
0.1rem
;
...
...
@@ -236,7 +240,7 @@
' <span>来源:'
+
Password
+
'</span>
\
n'
+
' </div>
\
n'
+
' <div class="box_r">
\
n'
+
// '
<
div
class
=
"copy"
onclick
=
"copy(
\
''+source+'
\
',)"
data
-
clipboard
-
action
=
"copy"
data
-
clipboard
-
target
=
"#tokenReadPackage
"
><
/div>
\n
'
+
' <div class="copy2
"></div>
\
n'
+
' <p>'
+
list
[
i
].
c
+
'</p>
\
n'
+
' </div>
\
n'
+
' </div>'
...
...
js/autosize2.js
View file @
69ba8ff0
/**
* Created by lovo_bdk on 15-12-17.
*/
!
(
function
(
win
,
doc
){
function
setFontSize
()
{
// 获取window 宽度
// zepto实现 $(window).width()就是这么干的
var
winWidth
=
window
.
innerWidth
;
doc
.
documentElement
.
style
.
fontSize
=
(
winWidth
/
375
)
*
100
+
'px'
;
//设置页面元素根元素的px大小,然后所有rem以此为基准。
//640为开发时候的页面宽度,20为基准px大小, 可以设置任意数字,方便开发时候rem计算
// !(function(win, doc){
// function setFontSize() {
// // 获取window 宽度
// // zepto实现 $(window).width()就是这么干的
// var winWidth = window.innerWidth;
// doc.documentElement.style.fontSize = (winWidth / 375) * 100 + 'px' ;
// //设置页面元素根元素的px大小,然后所有rem以此为基准。
// //640为开发时候的页面宽度,20为基准px大小, 可以设置任意数字,方便开发时候rem计算
//
// }
//
// var evt = 'onorientationchange' in win ? 'orientationchange' : 'resize';
//
// var timer = null;
//
// win.addEventListener(evt, function () {
// clearTimeout(timer);
//
// timer = setTimeout(setFontSize, 300);
// }, false);
//
// win.addEventListener("pageshow", function(e) {
// if (e.persisted) {
// clearTimeout(timer);
//
// timer = setTimeout(setFontSize, 300);
// }
// }, false);
//
// //初始化
// setFontSize();
//
// }(window, document));
(
function
(
win
)
{
var
docEl
=
win
.
document
.
documentElement
,
tid
;
function
refreshRem
()
{
var
width
=
docEl
.
getBoundingClientRect
().
width
;
var
rem
=
width
/
375
*
100
;
//以750px为原稿,除以100可得各元素的rem
docEl
.
style
.
fontSize
=
rem
+
"px"
;
var
actualSize
=
parseFloat
(
window
.
getComputedStyle
(
docEl
)[
"font-size"
]);
if
(
actualSize
!==
rem
)
{
var
remScaled
=
rem
/
(
actualSize
/
rem
);
docEl
.
style
.
fontSize
=
remScaled
+
"px"
}
}
var
evt
=
'onorientationchange'
in
win
?
'orientationchange'
:
'resize'
;
var
timer
=
null
;
win
.
addEventListener
(
evt
,
function
()
{
clearTimeout
(
timer
);
timer
=
setTimeout
(
setFontSize
,
300
);
},
false
);
function
dbcRefresh
()
{
clearTimeout
(
tid
);
tid
=
setTimeout
(
refreshRem
,
100
)
}
win
.
addEventListener
(
"resize"
,
function
()
{
dbcRefresh
()
},
false
);
win
.
addEventListener
(
"pageshow"
,
function
(
e
)
{
if
(
e
.
persisted
)
{
clearTimeout
(
timer
);
timer
=
setTimeout
(
setFontSize
,
300
);
}
if
(
e
.
persisted
)
{
dbcRefresh
()
}
},
false
);
//初始化
setFontSize
();
}(
window
,
document
));
refreshRem
();
})(
window
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment