Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
html
/
bdideal
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3c4bd8a4
authored
Mar 19, 2019
by
hank
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
3a9e22c6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
1 deletions
+17
-1
js/jquery.fadethis.min.js
+10
-0
style/index.css
+2
-0
style/index.less
+3
-1
style/solution.css
+1
-0
style/solution.less
+1
-0
No files found.
js/jquery.fadethis.min.js
0 → 100644
View file @
3c4bd8a4
/*
* jQuery FadeThis - v1.0.4
* A lightweight, simple, yet powerful jQuery plugin for appear-as-you-scroll features.
* https://github.com/lwiesel/jquery-fadethis/
*
* Made by lwiesel
* Under MIT License
*/
!
function
(
a
,
b
,
c
){
var
d
=
null
,
e
=
[],
f
=
a
(
b
),
g
=
function
(){};
a
.
expr
[
":"
].
hasClassStartingWith
=
function
(
a
,
b
,
c
){
var
d
=
new
RegExp
(
"\\b"
+
c
[
3
]);
return
d
.
test
(
a
.
className
)},
g
.
prototype
=
{
globals
:{
pluginName
:
"fadeThis"
,
bufferTime
:
300
},
defaults
:{
baseName
:
"slide-"
,
speed
:
500
,
easing
:
"swing"
,
offset
:
0
,
reverse
:
!
0
,
distance
:
50
,
scrolledIn
:
null
,
scrolledOut
:
null
},
init
:
function
(
a
,
b
){
this
.
addElements
(
a
,
b
),
this
.
_setEvent
(),
this
.
_checkVisibleElements
()},
addElements
:
function
(
d
,
e
){
var
f
=
d
===
c
.
body
?
b
:
d
,
g
=
a
(
f
===
b
?
"body"
:
f
),
h
=
this
,
i
=
e
&&
e
.
baseName
?
e
.
baseName
:
this
.
defaults
.
baseName
;
return
g
.
is
(
":hasClassStartingWith('"
+
i
+
"')"
)?
h
.
_addElement
(
g
,
e
):
g
.
find
(
":hasClassStartingWith('"
+
i
+
"')"
).
each
(
function
(){
h
.
_addElement
(
a
(
this
),
e
)}),
g
},
_addElement
:
function
(
b
,
c
){
var
d
=
b
.
data
(
"plugin-options"
),
f
=
a
.
extend
({},
this
.
defaults
,
c
,
d
),
g
=
{
element
:
b
,
options
:
f
,
invp
:
!
1
};
return
e
.
push
(
g
),
this
.
_prepareElement
(
g
),
b
},
_prepareElement
:
function
(
a
){
var
b
=
{
opacity
:
0
,
visibility
:
"visible"
,
position
:
"relative"
},
c
=
null
;
if
(
a
.
element
.
hasClass
(
a
.
options
.
baseName
+
"right"
))
c
=
"left"
;
else
if
(
a
.
element
.
hasClass
(
a
.
options
.
baseName
+
"left"
))
c
=
"right"
;
else
if
(
a
.
element
.
hasClass
(
a
.
options
.
baseName
+
"top"
))
c
=
"bottom"
;
else
{
if
(
!
a
.
element
.
hasClass
(
a
.
options
.
baseName
+
"bottom"
))
return
!
1
;
c
=
"top"
}
b
[
c
]
=
a
.
options
.
distance
,
a
.
element
.
css
(
b
)},
_setEvent
:
function
(){
var
a
=
this
;
f
.
on
(
"scroll"
,
function
(
b
){
d
||
(
d
=
setTimeout
(
function
(){
a
.
_checkVisibleElements
(
b
),
d
=
null
},
a
.
globals
.
bufferTime
))})},
_checkVisibleElements
:
function
(
b
){
var
c
=
this
;
a
.
each
(
e
,
function
(
a
,
d
){
c
.
_isVisible
(
d
)?
d
.
invp
||
(
d
.
invp
=!
0
,
c
.
_triggerFading
(
d
),
d
.
options
.
scrolledIn
&&
d
.
options
.
scrolledIn
.
call
(
d
.
element
,
b
),
d
.
element
.
trigger
(
"fadethisscrolledin"
,
b
)):
d
.
invp
&&
(
d
.
invp
=!
1
,
d
.
options
.
reverse
&&
c
.
_triggerFading
(
d
,
!
1
),
d
.
options
.
scrolledOut
&&
d
.
options
.
scrolledOut
.
call
(
d
.
element
,
b
),
d
.
element
.
trigger
(
"fadethisscrolledout"
,
b
))})},
_isVisible
:
function
(
a
){
var
b
=
f
.
scrollTop
()
+
a
.
options
.
offset
,
c
=
b
+
f
.
height
()
-
2
*
a
.
options
.
offset
,
d
=
a
.
element
.
offset
().
top
,
e
=
d
+
a
.
element
.
height
();
return
e
>=
b
&&
c
>=
d
&&
c
>=
e
&&
d
>=
b
},
_triggerFading
:
function
(
a
,
b
){
b
=
"undefined"
!=
typeof
b
?
b
:
!
0
;
var
c
=
{
opacity
:
1
},
d
=
{
opacity
:
0
},
e
=
null
;
if
(
a
.
element
.
hasClass
(
a
.
options
.
baseName
+
"right"
))
e
=
"left"
;
else
if
(
a
.
element
.
hasClass
(
a
.
options
.
baseName
+
"left"
))
e
=
"right"
;
else
if
(
a
.
element
.
hasClass
(
a
.
options
.
baseName
+
"top"
))
e
=
"bottom"
;
else
{
if
(
!
a
.
element
.
hasClass
(
a
.
options
.
baseName
+
"bottom"
))
return
!
1
;
e
=
"top"
}
c
[
e
]
=
0
,
d
[
e
]
=
a
.
options
.
distance
,
b
?
a
.
element
.
stop
(
!
0
).
animate
(
c
,
a
.
options
.
speed
,
a
.
options
.
easing
):
a
.
element
.
stop
(
!
0
).
animate
(
d
,
a
.
options
.
speed
,
a
.
options
.
easing
)}},
g
.
defaults
=
g
.
prototype
.
defaults
,
g
.
globals
=
g
.
prototype
.
globals
,
b
.
Plugin
=
new
g
,
a
.
fn
[
g
.
globals
.
pluginName
]
=
function
(
c
){
return
this
.
each
(
function
(){
a
.
data
(
b
,
"plugin_"
+
g
.
globals
.
pluginName
)?
a
.
data
(
this
,
"plugin_"
+
g
.
globals
.
pluginName
)
||
a
.
data
(
this
,
"plugin_"
+
g
.
globals
.
pluginName
,
b
.
Plugin
.
addElements
(
this
,
c
)):(
a
.
data
(
b
,
"plugin_"
+
g
.
globals
.
pluginName
,
"set"
),
a
.
data
(
this
,
"plugin_"
+
g
.
globals
.
pluginName
,
b
.
Plugin
.
init
(
this
,
c
)))}),
this
}}(
jQuery
,
window
,
document
);
\ No newline at end of file
style/index.css
View file @
3c4bd8a4
...
...
@@ -751,6 +751,7 @@ ul {
display
:
inline-block
;
height
:
100%
;
width
:
100%
;
text-decoration
:
none
;
}
.industry-dynamics
.list
.item
.img-container
{
width
:
396px
;
...
...
@@ -775,6 +776,7 @@ ul {
}
.industry-dynamics
.list
.item
.bottom-word
.name
{
display
:
inline-block
;
vertical-align
:
bottom
;
width
:
89px
;
height
:
24px
;
text-align
:
center
;
...
...
style/index.less
View file @
3c4bd8a4
...
...
@@ -800,6 +800,7 @@ ul {
display: inline-block;
height: 100%;
width: 100%;
text-decoration: none;
}
.img-container {
width: 396px;
...
...
@@ -824,6 +825,7 @@ ul {
padding-left: 30px;
.name {
display: inline-block;
vertical-align: bottom;
width:89px;
height:24px;
text-align: center;
...
...
@@ -1008,7 +1010,7 @@ ul {
-webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
.img-container {
}
img {
width: 100%;
...
...
style/solution.css
View file @
3c4bd8a4
...
...
@@ -382,6 +382,7 @@ ul {
width
:
89px
;
height
:
24px
;
text-align
:
center
;
vertical-align
:
bottom
;
line-height
:
24px
;
background
:
#c70151
;
color
:
#fff
;
...
...
style/solution.less
View file @
3c4bd8a4
...
...
@@ -405,6 +405,7 @@ ul {
width:89px;
height:24px;
text-align: center;
vertical-align: bottom;
line-height: 24px;
background:rgba(199,1,81,1);
color: #fff;
...
...
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