Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sup-server
Project
Project
Details
Activity
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
Administrator
sup-server
Commits
ca6ce659
Commit
ca6ce659
authored
Oct 09, 2022
by
huangjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
视频
parent
075028ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
5 deletions
+27
-5
index.html
dsk-srm-server/public/index.html
+1
-1
login.vue
dsk-srm-server/src/login.vue
+26
-4
No files found.
dsk-srm-server/public/index.html
View file @
ca6ce659
...
...
@@ -7,7 +7,7 @@
<link
rel=
"icon"
href=
"<%= BASE_URL %>favicon.ico"
>
<title><
%=
htmlWebpackPlugin
.
options
.
title
%
></title>
</head>
<body>
<body
style=
"margin: 0"
>
<noscript>
<strong>
We're sorry but
<
%=
htmlWebpackPlugin
.
options
.
title
%
>
doesn't work properly without JavaScript enabled. Please enable it to continue.
</strong>
</noscript>
...
...
dsk-srm-server/src/login.vue
View file @
ca6ce659
<
template
>
<div
class=
"main"
>
<div
class=
"video"
>
<video
autoplay
loop
>
<video
autoplay
loop
muted
class=
"homeVideo"
:style=
"
{width:widths,height:heights}"
>
<source
src=
"@/assets/background.mp4"
type=
"video/mp4"
>
</video>
</div>
...
...
@@ -11,14 +11,36 @@
<
script
>
export
default
{
data
()
{
return
{}
return
{
widths
:
''
,
heights
:
''
,
}
},
computed
:
{},
mounted
()
{},
mounted
()
{
this
.
widths
=
document
.
documentElement
.
clientWidth
+
'px'
this
.
heights
=
document
.
documentElement
.
clientHeight
+
'px'
console
.
log
(
this
.
widths
)
},
methods
:
{}
}
</
script
>
<
style
scoped
>
.home-video
{
z-index
:
100
;
position
:
absolute
;
top
:
50%
;
left
:
50%
;
min-width
:
100%
;
min-height
:
100%
;
object-fit
:
fill
;
/*这里是关键*/
width
:
auto
;
height
:
auto
;
-ms-transform
:
translateX
(
-50%
)
translateY
(
-50%
);
-webkit-transform
:
translateX
(
-50%
)
translateY
(
-50%
);
transform
:
translateX
(
-50%
)
translateY
(
-50%
);
/*background: url(../video/cover.jpg) no-repeat;*/
background-size
:
cover
;
}
</
style
>
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