PLM之家PLMHome-国产软件践行者

[前端框架] 一个简单的登录和注册HTML CSS开发页面

  [复制链接]

2019-11-27 15:14:40 2677 2

admin 发表于 2019-11-12 08:06:54 |阅读模式

admin 楼主

2019-11-12 08:06:54

请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!

您需要 登录 才可以下载或查看,没有账号?注册

x
一个简单的登录和注册HTML CSS开发页面
) p9 N0 V  E( S2 p; {$ _
& |3 P  G$ d! R: l  h, k login.JPG register.JPG + z2 A( y5 d- C4 I, H6 f2 y. ]
登录代码:
- ?" f% {% L5 D9 D9 p4 z- B4 |- Y' Z! I5 J' V* V( j
[mw_shl_code=html,true]<html lang="en">: s' H1 o6 @& M4 U7 L

% g8 V: ^# {* @4 e2 Z/ W. x( v<head>
1 R! @1 S2 S0 j: X" v! K, [0 l    <meta charset="UTF-8">
+ g2 E# ?' ^( }* A( ^% f    <meta name="viewport" content="width=device-width, initial-scale=1.0">! k( W5 n3 s% i& u
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
# W2 ]  ^/ R/ G7 k/ d/ L    <title>This is a login form</title>
: S4 \5 z3 h" `5 {3 G7 b( [9 d
) h9 ?( f  `# M2 R- M    <style>6 Z1 U; C/ K3 `2 B
        .modal {
& g* X$ Q4 P/ D            display: none;
: ^+ O/ y) o( A* K* w) c            width: 100%;5 I$ z! o( s4 q+ b
            height: 100%;3 C6 ^4 W9 m! y5 w
            position: fixed;0 l2 Y4 H7 G- m: `6 n, d6 v
            overflow: auto;
% q& K$ O0 o; t7 |8 F            z-index: 1;
. ?+ T7 [  y* y6 D3 @$ g, P& z' s1 P            left: 0;) R. S/ p9 X6 f7 C) A) U8 G
            top: 0;
: `5 l( n" C: E4 F2 |. U            background-color: rgb(0, 0, 0);/ Q; i( A& z# y9 _. g1 b0 X
            /* Fallback color *// P8 P8 E5 S' ^  u; ?
            background-color: rgba(0, 0, 0, 0.4);
( L' X7 G; M( f* {& ^  n            /* Black w/ opacity */1 @: f- b5 [' _+ W) D  ]3 v
            padding-top: 60px;% o) r) S2 L3 K4 z! S' c9 x) G
/ F, p/ s3 H) Q  c- \, \
        }
% E; P% B% z+ k0 O9 U9 [- S, O/ {: r1 e  w
        .modal-content {  a3 v/ K$ _$ j, j
            width: 60%;
: M. K& o& u; r' k  b. `/ r            background-color: #fefefe;# [3 v: m) o  o  R8 Y( D9 h
            margin: 5% auto 15% auto;
  d  \2 \# _" [, ]5 \7 e: L            border: 1px solid #888;! O  {+ Z& X6 z2 E

4 [. [7 }6 q8 o4 z        }9 ^$ P8 w' y( b7 e6 c7 O' m

0 F+ s4 X+ C, C9 D+ o2 x/ J( a        /* The Close Button (x) */3 n' w) [+ X. W; J) `
        .closeButton {  y- _8 F) T0 g5 _; V* h
            position: absolute;( {; m- z* m9 m7 K2 |3 e) ?9 ?$ L+ F
            right: 25px;' F# |4 x$ D) {+ u1 \
            top: 0;: ~7 O8 E* C( C1 Z
            color: #000;' s8 W% Z  _7 ^  L  J
            font-size: 35px;# ~/ R1 M, d1 A: r( E3 u
            font-weight: bold;
9 D) o+ V) O4 P- o& I        }% Y; ]9 i/ j5 A$ B

8 `1 j( ]7 m% z        .cancelbutton {
9 t: v6 J/ A& R& A5 u# X" r            width: auto;5 q* q( I. E8 n1 s2 `, X4 y
            padding: 10px 18px;+ `* w2 I, x( M& S: _3 I/ O
            background-color: #f44336;
% s2 k/ p. O" y9 m2 H        }" j( d: U: K/ X, z+ T
6 {$ ?9 U$ ?( J- j, X: n
        span.password {
( f/ Q# h# _4 T            float: right;) [8 W( L- _  k2 {$ Z- G- w5 D
            padding-top: 16px;
( X4 D: A7 h* G- H4 s# J9 m( r6 m2 T        }% _# q8 \# Z* i8 L) w6 e6 O9 B

' r) ]/ [  d* ?, |, U$ ~) C) h        .closeButton:hover,, \1 R" g$ v0 x" o
        .closeButton:focus {' y1 y5 X( [6 r# f+ g* s+ J
            color: firebrick;
9 h* M: s  j3 Z; R3 s            cursor: pointer;$ l4 {6 B, \4 \) N0 }9 n; Y

+ I! Y- N: `7 l/ A9 O$ |0 l        }
" c; B8 F+ m$ ~3 w" \: \+ _0 M: G5 D( O
        .imgcontainer {
, j+ C3 Z2 ~, F9 S' ^            text-align: center;
5 f# v# j# @  K" Q% d            margin: 24px 0 12px 0;' J. `* \& i3 i6 w6 X5 w' ~1 z4 \
            position: relative;: U" u8 O( p, b
        }2 }8 e# y' _/ J' d0 A2 o5 P. o
8 o1 _8 [1 R: q6 w. q* k& ~9 a
        .avtar {& \1 J& }" M4 R/ q; h3 O  ]7 H
            width: 40%;8 y$ V. g& r3 C& w
            border-radius: 50%;- O1 `! r9 b0 U' S
        }
  }9 X# V$ P. x3 V. a  m/ ?7 E8 M4 u1 l# ?$ q
        .container {+ P" d! _" n7 t& T3 d. U  p
            padding: 16px;8 `5 d' H4 c7 Q3 `# t! w" g
        }( m6 ]" h0 O% n

) R% t" H# J+ h/ R  b9 ^8 l        /* Full-width input fields */
2 U, u' ?# D# X. C3 Y4 S        input[type=text],. |9 E8 ?5 i1 i0 z5 v% h
        input[type=password] {
3 _" S+ }  I9 M7 a8 X+ c            width: 100%;
2 a3 {: D( G/ j# F3 y' o2 ?4 [$ [            padding: 12px 20px;
3 ?( s' b1 S5 K2 v8 N            margin: 8px 0;
- t: V! y. u3 N8 ?, f0 H            display: inline-block;; Q) q. u6 E8 S* F* |! y! E/ |3 g- O
            border: 1px solid #ccc;* M6 _% S' [- r5 y. E1 g  N
            box-sizing: border-box;
) U0 o3 m" o& v        }7 [) r% G& p2 F& T) }4 c3 p- d

0 t4 G7 t6 Z& A        /* Set a style for all buttons */
, b9 l% P' q( W" W# g- ^! Y8 k; Y        button {
! w' M) a5 Y) x2 w            background-color: #4CAF50;
: l+ Q- B5 B+ ?            color: white;# v4 j! _* v: F
            padding: 14px 20px;
7 M8 G& [6 f! N2 i; v- G            margin: 8px 0;
) d6 m2 j: y) p% k            border: none;
( C/ f" r2 R# L8 P% H( Z            cursor: pointer;& `& e1 [# [  O/ N6 `! m9 H, ]
            width: 100%;/ K2 K4 A8 v4 Y1 K
        }
/ p, E0 V# t) P* K$ _3 |5 A/ V' x! D+ g* f

( H3 D0 F8 ^) ?8 f        button:hover {$ ?1 U' F% J* N. p+ J! `8 X* m- R
            opacity: 0.8;
9 S; d3 \7 h. ^& W# y3 f' f        }" c, D9 N% \. B  K: x
& [: [4 p. k. c5 [. V  q7 y
        /* Add Zoom Animation */
; _+ V1 R2 y* f; l# z6 ]+ L        .animate {
0 Q: @" S1 h9 Z4 E9 C& f            -webkit-animation: animatezoom 0.6s;) n1 S0 f' c# h( ?  r/ g& a) D
            animation: animatezoom 0.6s/ N" n3 i% t6 E1 ?; R1 t1 ~  l
        }+ E6 r6 F( o. y* _

0 P1 M6 a* @" F6 \' q& _, {        @-webkit-keyframes animatezoom {% u0 p% }( }1 j3 M# W" e, Q: B- I
            from {! Z' c" O% ~! `0 {2 w" T# N0 G. E
                -webkit-transform: scale(0)3 L6 k9 ?) a; ]' \' w9 h5 M1 b
            }6 _- h' W$ W5 n6 ?

3 g& w. F3 f- I: H$ g% ^            to {% v9 `, L/ f+ }8 }: M
                -webkit-transform: scale(1)
( A) t7 c+ f' r            }4 o! R! ]( Z: y$ F
        }
) f3 ~6 S' K' G7 N6 T, ]- H* U+ L# Y
, Y& y( Z, e3 a+ J        @keyframes animatezoom {
6 w/ q: s% F$ l8 |            from {
7 k  S0 l5 y; X* Y7 [; \                transform: scale(0)+ R$ b0 c6 z/ l: D! \% x
            }0 x: b) W( Q; K2 C

+ b9 v% y. K# x* n. w0 a5 T            to {; l" u$ X9 y. b1 M+ ~
                transform: scale(1)
- ?+ T9 Q1 `9 [. g            }
2 w6 c8 c+ o* ]: L! w: B        }7 x5 W* t+ P) ?7 T9 E0 a9 Z
        /* Change styles for span and cancel button on extra small screens */
$ F* B. K2 @1 ?3 k, D, |' L- A, J        @media screen and (max-width: 300px) {
2 h) O, B$ W7 b) `( r            span.password {2 j$ B: n& e# Q6 L. d% Q* y
                display: block;
2 q4 K8 f+ K. n. C# W                float: none;9 _6 B8 O' g: V0 [
            }; s$ o5 ?7 ~% A  a+ x# i" R6 ]

! P" Q% M" O, `7 l            .cancelbutton {) O! l: Z2 M8 v  _' K
                width: 100%;
5 ~0 X) M$ h& f; s# {0 o1 q4 @# W            }
" S* I$ y$ o7 R        }3 }, p2 \& ~/ x3 j# Z+ N
    </style>
' I% p+ `5 B/ k! E% \4 p; Z</head>
# z2 H4 t3 v, H2 y' }" v. \
" _$ U, @+ v* e) B7 q, e4 E) T2 [<body>
) p2 z# J$ g" Y, E% A2 T7 @  Y# i
0 C' ?+ Q! ?& f9 ]    <button id="login">login</button>
$ \8 q. x6 ^: r- _# T# a( H    <button id="register">register</button>; \( ?% |, B/ P& {

) [( ]% w# B$ k8 w1 S5 m! j    <div id="formPanel" class="modal">
3 [; a1 L2 Y* R' [7 u, H1 a  _        <form action="./img/logo.png" class="modal-content animate">
: y. R. V. P. l            <!-- image -->) |# b' {, n0 G) {5 O# s( Z
            <div class="imgcontainer">
( g  ^$ c  }" L" }$ @                <span id="closeButton" class="closeButton"
: ^' y* o8 y) s                  
- [& ?4 o( k/ `& j5 q0 A                    title="close form">×</span>: O& m& U9 ]/ E+ h# T, x  j6 N
                <img src="./img/img_avatar.png" alt="avatar" class="avtar">% Y) |2 f2 ?. U2 x; g. J
            </div># N( b9 z6 O! v; I
            <!-- information -->
: T& S" ?: @0 S9 K0 b* {; v# |& v2 K            <div class="container">
  Q- T' |+ @3 R5 _9 S                <label><b>UserName</b></label>
; ?# ]5 [" Z2 b  z                <input type="text" placeholder="username" class="username" required>6 ~) n/ w& q  k! |$ E+ z. K
                <label><b>Password</b></label>! W8 `* G# {% k% J/ F" p4 n0 E4 h
                <input type="password" placeholder="password" class="password" required>
+ C0 b: L4 ]9 I! M1 T" C3 r- F                <button class="loginButton">Login</button>
1 O" r4 A3 M! e9 J8 X/ C1 F" K* r  b" K                <input type="checkbox" checked>Remember Me
5 v+ v. n, a7 c2 h7 b3 a            </div>
6 g- f7 H6 L( _) \+ S; p( U: F" V8 r6 ]& x' x$ f6 u4 @
            <div class="container">' w* v3 S4 }, B" o1 ]* ?1 m* g, ~
                <button class="cancelbutton" type="button"
7 M+ j5 j& s5 A& D0 b1 I# \                   >Cancel</button>
+ f  m7 d# w8 G( A, n" }                <span class="password">Forgot
9 \8 }. O8 e- D' ?                    <a href="#">password?</a>
; K- k) @6 z; G& d2 T' E1 G3 k+ d                </span>
! {' Q* D) L( ]. n) q3 b            </div>
3 j3 k+ i9 g$ T        </form>+ \2 v* t" N) H8 c  ?' `9 a
    </div>
* i* W# b. D" i9 B. s2 R" G* u" K/ c  s2 _) m
! g3 W+ M9 U2 W8 b6 M
    <script>
/ n- a; q' @8 O6 N* e9 J5 j* v0 |9 d: c( o! z
        function loginForm() {
1 I. n% j' L# S, z            var formx = document.getElementById("formPanel")
2 B) z, R) t2 ^* J9 x2 ]% U            formx.style.display = "block"
& T9 S. v2 K: [$ k% t6 @8 O' e7 Q        }
/ V$ d: Q1 F$ r! ^8 O- W" I    </script>
4 n, K5 d& h9 _8 \* K# [- D4 b& ^" F* ?  B$ {, }/ h- |
' C' `8 i+ J  J9 B3 B% Z6 T( p
</body>0 _" b7 C# B  ]* G
7 t2 a% x- @- T, k. b! _! Z
</html>[/mw_shl_code]7 Q2 q0 H( S/ Y/ s( w
6 v- J9 d/ c! h* z1 f8 Z1 Z

7 x4 A8 G$ U; _8 o注册代码' h% K; K/ v* y! W& Q/ j8 y0 D

% o( K6 _0 S. M; @8 f[mw_shl_code=html,true]<html lang="en">* P# }& }! @, N/ b, j2 ?, j
  u& e8 h! T5 v: u" z
<head>
: }% v/ r0 F- P- z    <meta charset="UTF-8">
6 w% Z' [) }" l8 P# H    <meta name="viewport" content="width=device-width, initial-scale=1.0">  {; q. n0 B  h- B, s; j
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+ Z" L1 ^9 s+ q5 T    <title>register form</title>, a6 D! Q. F4 G" u* f4 l& L  I
8 D! q/ F. e% ]. f* J
    <style>, ]& {( J- y7 n# {
        .panel {
! M( Y) y' W  a, A) ~/ ]) o            width: 100%;
- v9 V! a% @" M            height: 100%;
  I: e# h. H+ w- _8 T            background-color: rgb(0, 0, 0, 0.2);0 n/ `# [' j) P9 |$ @
            padding-top: 30px;
; x& C2 d% ~- f. ]% K% u7 b( G# M            overflow: auto;& b5 [- z1 V. X- W" ]( R1 \9 \7 A
            position: fixed;7 q. S( _0 \: M( I1 h% M
            left: 0;: e0 n! A/ ?, f# @6 b
            right: 0;
% {7 f3 g* s' h$ x' b1 ]0 M            z-index: 1;
( \4 q& {+ Q  G1 R6 B4 K1 Z" O        }
- X1 Z) I3 B, e+ b
, C9 b; L* O4 S* W7 l        .modal-content {
2 O) D* U1 I9 I            background: #fefefe;/ Q6 X/ a5 c6 S4 c  V5 Y- ]% E
            width: 60%;6 y3 t+ b# R' n. y) ]6 Q
            border: 1px solid #888;5 o% G7 e5 y( A: S5 @3 \. r9 ^7 l
            margin: 5% auto 25% auto;: b. a+ [9 D: n/ B& C# w* X1 O

$ ?7 {; B+ N2 U        }7 j9 P! q% c. C" F/ J
# G, j* H8 P9 N, y! K5 F( Y5 b5 ?
        .container {
8 c  l  T& t) W0 n2 y) b            padding: 16px;
' r* k. ~$ ~* j$ _. C  X        }
" b! {5 J) x! A# V3 O* J
5 C6 H2 f6 Q+ Z6 f4 w0 n        .close {
  o5 ~( K( O; r4 G/ h            font-size: 40px;
$ v9 |7 d0 z( e4 o' t9 p9 ~3 E' b: F            position: absolute;
9 `3 b2 P/ N. e; N- h. I            top: 15px;
4 t1 X2 x8 `# [  D            right: 20px;
. z% x# J( n5 v) X% ]        }7 X, Y7 y1 ^& p2 D$ x  C& S5 I
, n  P+ y" Z2 i! Z; ?. `& f. G. z1 W
        .close:hover,
8 L) V- N- b) F7 r! n4 L6 i" p+ W        .close:focus {5 P. ]4 M7 R( s% o* D: Q$ {9 ~6 r
            color: red;
+ n5 d1 W2 ]5 b9 Z: t: h5 l2 h            cursor: pointer;3 j4 f9 |9 d5 `: B, u) g
        }
  w# V0 P9 D( d: r; N1 @0 l; {: s: Y, }" b1 n
        input[type=text],1 c2 d6 Q% g# |( K! \
        input[type=password] {
) x1 a. T$ X: r! d            width: 100%;
- D. r. J% ~' v' B            padding: 12px 20px;% d6 e. h3 K2 ~7 }4 A0 I- b
            margin: 8px auto;/ Z1 J& b6 w$ P- _$ p+ N2 e
            border: 1px solid #cccccc;
5 j6 ~9 w% @4 Y# e! ?" L            display: inline-block;( P9 Y6 O) t" {& t1 ^7 C) J! p/ L9 E
        }
+ Q; ^+ g: q6 s+ B
/ p1 k. i3 _3 U5 @        button {6 n8 X7 q0 Z% w; d
            background-color: #4CAF50;4 D# @2 Y8 _+ o$ L
            color: white;4 o2 q$ @( S% [
            padding: 14px 20px;
& D0 q/ Y) p( C6 `3 X7 [            margin: 8px 0;
/ b& y" d3 ]: N& l            border: none;  @+ u  I: P) w6 ~7 X1 m- I5 t
            cursor: pointer;
: n& P; r5 [( |            width: 100%;# X' `$ h3 W$ l$ s0 y7 Y
        }. h3 g' t! I* C) O
* z# n/ b% A1 y, l
        .cancelbutton {
: z7 [) J9 k+ J1 |' R  ?+ L            padding: 14px 20px;
) L4 ~1 Z/ g4 e+ i0 P            background-color: #f44336;
4 a- K1 L) h& q- a4 J, ^! q, h        }
; @/ k# U, g/ ]7 f6 {/ m9 ^2 R7 Q* B5 o; Y; \
        .cancelbutton,2 x5 `+ O" Q  x9 ]+ W. l! {1 p, y
        .registerbutton {+ e7 r; _3 @$ `& q$ G3 }
            float: left;- h) `' V# G* `3 F# S
            width: 50%
, j3 i3 ^: U4 O% O. I9 R! c        }8 S, c9 [5 O4 Y( [$ V
4 I: M8 L' ^( c+ F# X" X
        .clearfix::after {
! t4 ?  ^/ F4 ^  m2 D            content: "";' E7 N! E" Y% S5 w: j( I/ d# _4 n1 F5 V
            clear: both;+ L8 J. P# Q, s# O, f3 Z* P  F
            display: table;
( h% a- j. F0 z6 F- K        }" z$ b) {/ K& B
    </style>
1 y# ^0 I  I- R2 S5 m
! l1 q! s( l8 @4 a  @
- V! `# L0 U; a4 H/ [: }9 E) x2 W. V2 x# Q4 r) D' r
</head>+ w8 G: |7 \4 L( }
. M3 @& |: b* I3 s9 a; u1 t
<body>
/ k' D0 r2 w! Y  h$ g7 O
. e$ x- D* K+ c7 K, v    <div id="modal" class="panel">
* L1 p* m' U8 U/ j/ c/ K6 B        <span class="close">x</span>, q9 Y5 L/ t) b0 l
        <form action="#" class="modal-content">0 R, D% A7 Q" [5 q
            <div class="container">1 G7 b! U- {# A3 ~' R& [  l8 u
                <label>Email</label>
: I8 K. V: u! E. M- C5 F5 z                <input type="text" placeholder="Emmail" required>
7 l; e, ?( T# k5 M: J7 W                <label>Username</label>
4 a( _* u# f0 i, f4 p6 ~                <input type="text" placeholder="username" required>
9 x( y! D. i5 g% @' K5 D                <label>password</label>* l% F+ g" R7 ?# ~: N2 e* j; X) O
                <input type="password" placeholder="password" required>: e1 ?8 n/ b6 F7 O. n% j. y* M
                <input type="checkbox" checked> remember me
% D4 z/ f$ X  W3 j$ E5 N                <p>Follow the policy <a href="#">terms & privacy</a></p>+ J4 s& y+ m  r8 F& x) n

/ q6 W+ C" G/ g3 i1 V4 ~' A5 h( q+ ~6 W
                <div class="clearfix">
% j" z5 |$ S* I9 z% ]) \- Q+ y                    <button class="cancelbutton">Cancel</button>! ^; v; n" H2 n' A+ M" I& I
                    <button class="registerbutton">Register</button>
! y* H* z+ A" U" x) `! q/ F                </div>2 U6 l2 o  l2 l6 j6 I! ]
            </div>
( U1 D7 z4 J" M( _3 K0 o1 {        </form>
' i* N( ]( w. P4 T. t, M    </div>
% N& V% G6 n; Q: O. r( m$ e" z4 Q- b' G0 Y, _, v
% }. B+ t4 X' B1 x. a. ^% @* g

  I& Q) y1 T, `9 C6 N. m; I% H' \- g9 [. {. U  ?

9 t% ]# x% I: M2 J3 I3 X</body>
6 L6 P% r+ h" F* y5 H' Y& D
) F* w* Z" A& ], r; G4 o. c1 F</html>[/mw_shl_code]
, |; q; l: i4 @& v- \  O
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 doTeam.tech
回复

使用道具 举报

全部回复2

lacconi 发表于 2019-11-27 15:11:50

lacconi 沙发

2019-11-27 15:11:50

PLM之家二次开发源码分享
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 www.diantuankj.com/ doTeam.tech
回复 支持 反对

使用道具 举报

lacconi 发表于 2019-11-27 15:14:40

lacconi 板凳

2019-11-27 15:14:40

PLM之家二次开发源码分享
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 www.diantuankj.com/ doTeam.tech
回复 支持 反对

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 注册

返回列表 本版积分规则

  • 发布新帖

  • 在线客服

  • 微信

  • 客户端

  • 返回顶部

  • x
    温馨提示

    本网站(plmhome.com)为PLM之家工业软件学习官网站

    展示的视频材料全部免费,需要高清和特殊技术支持请联系 QQ: 939801026

    PLM之家NX CAM二次开发专题模块培训报名开始啦

    我知道了