Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
ww_matching_cards
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
ww_matching_cards
Commits
9ebe368b
Commit
9ebe368b
authored
Aug 13, 2020
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 图片背景
parent
c4101002
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
15 deletions
+44
-15
play.component.html
src/app/play/play.component.html
+18
-15
play.component.scss
src/app/play/play.component.scss
+26
-0
player-bg.png
src/assets/player-bg.png
+0
-0
No files found.
src/app/play/play.component.html
View file @
9ebe368b
<div
class=
"player-matching-cards"
>
<div
class=
"body-bg"
></div>
<div
nz-row
nzGutter=
"16"
style=
"height: 100%"
>
<div
class=
"player-border"
>
<div
nz-col
class=
"gutter-row cell"
<div
class=
"player-matching-cards"
>
#
itemContainer
<div
nz-row
nzGutter=
"16"
style=
"height: 100%"
>
[
nzSpan
]="
24
/
cols
"
<div
nz-col
class=
"gutter-row cell"
[
ngStyle
]="{
height:
(
100
/
rows
)
+
'%',
'
user-select
'
:
'
none
'}"
#
itemContainer
*
ngFor=
"let card of all"
>
[
nzSpan
]="
24
/
cols
"
<div
class=
"item"
(
click
)="
flipCard
($
event
,
card
.
type
,
card
.
word
)"
>
[
ngStyle
]="{
height:
(
100
/
rows
)
+
'%',
'
user-select
'
:
'
none
'}"
<div
class=
"k-16-9"
>
*
ngFor=
"let card of all"
>
<img
class=
"back"
src=
"assets/matching-cards/cardback.png"
alt=
""
>
<div
class=
"item"
(
click
)="
flipCard
($
event
,
card
.
type
,
card
.
word
)"
>
<div
class=
"k-full-fill"
*
ngIf=
"card.type === 'pic'"
>
<div
class=
"k-16-9"
>
<img
class=
"pic"
[
src
]="
card
.
pic_id
"
>
<img
class=
"back"
src=
"assets/matching-cards/cardback.png"
alt=
""
>
</div>
<div
class=
"k-full-fill"
*
ngIf=
"card.type === 'pic'"
>
<div
class=
" k-full-fill"
*
ngIf=
"card.type === 'word'"
>
<img
class=
"pic"
[
src
]="
card
.
pic_id
"
>
<span
class=
"word fit-font-size"
>
{{card.word}}
</span>
</div>
<div
class=
" k-full-fill"
*
ngIf=
"card.type === 'word'"
>
<span
class=
"word fit-font-size"
>
{{card.word}}
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/app/play/play.component.scss
View file @
9ebe368b
.body-bg
{
position
:
absolute
;
top
:
0px
;
left
:
0px
;
right
:
0px
;
bottom
:
0px
;
background-image
:
url('../../assets/player-bg.png')
!
important
;
background-size
:
100%
;
}
.player-border
{
position
:
absolute
;
left
:
calc
((
100%
-
100vh
*
1
.36
)
/
2
);
top
:
5vh
;
right
:
calc
((
100%
-
100vh
*
1
.36
)
/
2
);
bottom
:
5vh
;
text-align
:
center
;
// box-shadow: 0 2px 12px 0 rgba(0,0,0,.3);
border-radius
:
11px
;
border
:
20px
solid
#23b1c2
;
background-color
:
#fff
;
overflow
:
hidden
;
color
:
#303133
;
transition
:
.3s
;
}
.player-matching-cards
{
.player-matching-cards
{
background
:
#f4ffeb
;
background
:
#f4ffeb
;
padding
:
4vh
6vh
;
padding
:
4vh
6vh
;
...
...
src/assets/player-bg.png
0 → 100644
View file @
9ebe368b
47.2 KB
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