黑马程序员技术交流社区
标题:
div+css前端登录页面
[打印本页]
作者:
sout(黑马)
时间:
2019-4-17 19:34
标题:
div+css前端登录页面
<!DOCTYPE
html
>
<
html
lang=
"en"
>
<
head
>
<
meta
charset=
"utf-8"
>
<
meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<
meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<
title
>
登录界面
</
title
>
<
link
rel=
"stylesheet"
type=
"text/css"
href=
"css/bootstrap.min.css"
/>
<
style
>
body
{
box-sizing
:
border-box
;
padding-top
:
calc
(
30
vh
-
6
em
)
;
font
:
150
%/
1.6
Baskerville
,
Palatino
,
serif
;
background
:
url
(
img/bgground2.png
)
no-repeat
;
}
body
,.
bg_img
::
before
{
background
:
url
(
"img/bgground2.png"
)
0
/
cover fixed
;
}
.
bg_img
{
position
:
relative
;
margin
:
0
auto
;
padding
:
1
em
;
max-width
:
23
em
;
background
:
hsla
(
0
,
0
%,
100
%,
.25
)
border-box
;
overflow
:
hidden
;
border-radius
:
.3
em
;
box-shadow
:
0 0 0 1
px
hsla
(
0
,
0
%,
100
%,
.3
)
inset
,
0 .5
em
1
em
rgba
(
0
,
0
,
0
,
0.6
)
;
text-shadow
:
0 1
px
1
px
hsla
(
0
,
0
%,
100
%,
.3
)
;
}
.
bg_img
::
before
{
content
:
''
;
position
:
absolute
;
top
:
0
;
right
:
0
;
bottom
:
0
;
left
:
0
;
margin
:-
30
px
;
z-index
:-
1
;
-webkit-filter
:
blur
(
20
px
)
;
filter
:
blur
(
20
px
)
;
}
.
pad-top
{
padding-top
:
50
px
}
#asider
{
height
:
360
px
;
padding-right
:
78
px
;
}
#asider form
>
div
{
height
:
60
px
;
}
#asider form input
{
width
:
200
px
;
}
.
btn-m
{
margin-left
:
125
px
;
}
.
btn-m button
{
width
:
90
px
;
height
:
35
px
;
background-color
:
rgba
(
0
,
0
,
0
,
0.08
)
;
}
</
style
>
</
head
>
<
body
>
<
div
class=
"bg_img"
id=
"asider"
>
<
img
src=
"img/logo.jpg"
class=
"img-responsive"
>
<
form
class=
"form-horizontal pad-top"
method=
"post"
action=
"index.html"
>
<
div
class=
"form-group"
>
<
label
for=
"username"
class=
"col-sm-4 control-label"
>
用户名
</
label
>
<
div
class=
"col-sm-4"
>
<
input
type=
"text"
class=
"form-control"
id=
"username"
placeholder=
"请输入用户名"
>
</
div
>
</
div
>
<
div
class=
"form-group"
>
<
label
for=
"password"
class=
"col-sm-4 control-label"
>
密码
</
label
>
<
div
class=
"col-sm-4"
>
<
input
type=
"password"
class=
"form-control"
id=
"password"
placeholder=
"请输入密码"
>
</
div
>
</
div
>
<
div
class=
"form-group"
>
<
div
class=
"col-sm-offset-2 col-sm-8 btn-m"
>
<
button
type=
"submit"
class=
"btn btn-default"
>
登录
</
button
>
</
div
>
</
div
>
</
form
>
</
div
>
<
script
src=
"js/jquery-3.2.1.min.js"
type=
"text/javascript"
charset=
"utf-8"
></
script
>
<
script
src=
"js/bootstrap.min.js"
type=
"text/javascript"
charset=
"utf-8"
></
script
>
</
body
>
</
html
>
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/)
黑马程序员IT技术论坛 X3.2