рд╢реБрджреНрдз рд╕реАрдПрд╕рдПрд╕ рдлреЙрд░реНрдо рдкреЙрдкрдЕрдк

рд╢рд╛рдпрдж рдЖрдк рдкрд╣рд▓реЗ рд╕реЗ рд╣реА рдЗрд╕ рддрдХрдиреАрдХ рдореЗрдВ рдЖ рдЧрдП рд╣реИрдВред рдпрд╣ рдПрдХ рдЗрдирдкреБрдЯ рдлрд╝реАрд▓реНрдб рд╣реИ рдЬреЛ рдРрд╕рд╛ рджрд┐рдЦрддрд╛ рд╣реИ рдЬреИрд╕реЗ рдХрд┐ рдЗрд╕рдореЗрдВ рдЯреЗрдХреНрд╕реНрдЯ рдкреНрд░реЙрдореНрдкреНрдЯ (рдкреНрд▓реЗрд╕рд╣реЛрд▓реНрдбрд░) рд╣реИ, рд▓реЗрдХрд┐рди рдЬрдм рдЖрдк рдЯрд╛рдЗрдк рдХрд░рдирд╛ рд╢реБрд░реВ рдХрд░рддреЗ рд╣реИрдВ рддреЛ рдпрд╣ рдЧрд╛рдпрдм рдирд╣реАрдВ рд╣реЛрддрд╛ рд╣реИ, рдмрд▓реНрдХрд┐ рд╕рд╛рдЗрдб рдореЗрдВ рдзрдХреЗрд▓ рджрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИред рдореБрдЭреЗ рдпрд╣ рд╡рд┐рдЪрд╛рд░ рдкрд╕рдВрдж рд╣реИред рдмреНрд░реИрдб рдлреНрд░реЙрд╕реНрдЯ рдиреЗ рдЗрд╕ рддрдХрдиреАрдХ рдХреЗ рдмрд╛рд░реЗ рдореЗрдВ рдПрдХ рдмрд╣реБрдд рдЕрдЪреНрдЫрд╛ рд▓реЗрдЦ рд▓рд┐рдЦрд╛ рдерд╛, рдЬрд┐рд╕рдореЗрдВ рд╕рднреА рдкреЗрд╢реЗрд╡рд░реЛрдВ рдФрд░ рд╡рд┐рдкрдХреНрд╖реЛрдВ рдХреЗ рдмрд╛рд░реЗ рдореЗрдВ рд╡рд┐рд╕реНрддрд╛рд░ рд╕реЗ рдЬрд╛рдВрдЪ рдХреА рдЧрдИ рдереАред

рдЗрд╕ рддрдХрдиреАрдХ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░рдиреЗ рдХреЗ рдЕрдзрд┐рдХрд╛рдВрд╢ рдЙрджрд╛рд╣рд░рдг рдЬрд╛рд╡рд╛рд╕реНрдХреНрд░рд┐рдкреНрдЯ рдкрд░ рдирд┐рд░реНрднрд░ рдХрд░рддреЗ рд╣реИрдВред рдПрдХ рджрд┐рди рдареАрдХ рд╣реИ, рдореИрдВ nest.com рдкрд░ рдЧрдпрд╛, рд╡рд╣рд╛рдВ рдЗрд╕ рддрдХрдиреАрдХ рдХреЛ рджреЗрдЦрд╛ рдФрд░ рд╕реЛрдЪрд╛: рдХреНрдпрд╛ рдЬрд╛рд╡рд╛рд╕реНрдХреНрд░рд┐рдкреНрдЯ рдХреЗ рдмрд┐рдирд╛ рднреА рдЗрд╕реЗ рд▓рд╛рдЧреВ рдХрд░рдирд╛ рд╕рдВрднрд╡ рд╣реИ? рдФрд░ рдпрд╣ рд╡рд╣реА рд╣реИ рдЬреЛ рдпрд╣ рдЖрдпрд╛ рдерд╛ред

рдпрд╣ рдРрд╕рд╛ рдХреНрдпрд╛ рд╣реИ рдЬреЛ рдШреЛрдВрд╕рд▓реЗ.рдХреЙрдо рдкрд░ рджрд┐рдЦрддрд╛ рд╣реИ:

рдЫрд╡рд┐

рдЖрдк CodePen рдкрд░ рдореЗрд░реЗ рд╕рдВрд╕реНрдХрд░рдг рдХреЛ рджреЗрдЦ рд╕рдХрддреЗ рд╣реИрдВ ред рдмреЗрд╢рдХ, рдпрд╣ рдиреЗрд╕реНрдЯ рдХреА рддрд░рд╣ рд╢рд╛рдВрдд рдирд╣реАрдВ рд╣реЛрдЧрд╛, рдЬрд╣рд╛рдВ рдкрд╛рда рдЖрд╕рд╛рдиреА рд╕реЗ рдЧрд╛рдпрдм рд╣реЛ рдЬрд╛рддрд╛ рд╣реИ рдФрд░ рд▓реЗрдмрд▓ рдиреАрдЪреЗ рд╕реЗ рдЖрдЧреЗ рдмрдврд╝рддрд╛ рд╣реИред рдмреЗрд╢рдХ, рдореИрдВ рдЬрд╛рд╡рд╛рд╕реНрдХреНрд░рд┐рдкреНрдЯ рдХреЗ рд╕рд╛рде рдРрд╕рд╛ рд╣реА рдХрд░ рд╕рдХрддрд╛ рдерд╛, рдЬреИрд╕рд╛ рдХрд┐ рдореИрдВрдиреЗ рд╢рд╛рдпрдж рд╢реБрджреНрдз рд╕реАрдПрд╕рдПрд╕ рдореЗрдВ рдХрд┐рдпрд╛ рд╣реЛрдЧрд╛, рд▓реЗрдХрд┐рди рд▓реЗрдЦ рдХрд╛ рд▓рдХреНрд╖реНрдп рд╕рд┐рджреНрдзрд╛рдВрдд рджрд┐рдЦрд╛рдирд╛ рд╣реИ, рдФрд░ рдЖрдк рдЕрдкрдиреА рд╕реБрдВрджрд░рддрд╛ рдмрдирд╛ рд╕рдХрддреЗ рд╣реИрдВред

рдЗрд╕ рддрдХрдиреАрдХ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░рдиреЗ рдХреЗ рджреЛ рдХрд╛рд░рдг рд╣реИрдВ:

  1. рдЕрдВрддрд░рд┐рдХреНрд╖ рдмрдЪрд╛рдУред рдЪреВрдВрдХрд┐ рдЗрдирдкреБрдЯ рдХреНрд╖реЗрддреНрд░ рдФрд░ рдЙрд╕рдХреЗ рд▓реЗрдмрд▓ рд╕рдВрдпреБрдХреНрдд рд╣реИрдВ, рд╡реЗ рдХрдо рдЬрдЧрд╣ рд▓реЗрддреЗ рд╣реИрдВред рдЬрдм рдЗрдирдкреБрдЯ рдлрд╝реАрд▓реНрдб рдлрд╝реЛрдХрд╕ рдореЗрдВ рд╣реЛ рдЬрд╛рддрд╛ рд╣реИ, рддреЛ рджреЛрдиреЛрдВ рдХреЛ рджреЗрдЦрдирд╛ рдЬрд╛рд░реА рд░рдЦрдиреЗ рдХреЗ рд▓рд┐рдП, рдЖрдк рдлрд╝реАрд▓реНрдб рдХреЗ рдЕрдВрджрд░ рд╕реНрдкреЗрд╕ рдХрд╛ рд╣рд┐рд╕реНрд╕рд╛ рд▓реЗ рд╕рдХрддреЗ рд╣реИрдВ, рдпрд╛ рдЕрд╕реНрдерд╛рдпреА рд░реВрдк рд╕реЗ рджреВрд╕рд░реЛрдВ рдХреЗ рдЦрд░реНрдЪ рдкрд░ рдЗрд╕ рд╡рд┐рд╢реЗрд╖ рдЗрдирдкреБрдЯ рдлрд╝реАрд▓реНрдб рдХреЗ рд▓рд┐рдП рд╕реНрдкреЗрд╕ рдХрд╛ рд╡рд┐рд╕реНрддрд╛рд░ рдХрд░ рд╕рдХрддреЗ рд╣реИрдВред
  2. рд╕рдВрдкреВрд░реНрдг рдЗрдирдкреБрдЯ рдлрд╝реАрд▓реНрдб рдПрдХ рдмрдбрд╝рд╛ рдмрдЯрди рдмрди рдЬрд╛рддрд╛ рд╣реИред рдмреЗрд╢рдХ, рд╕рд╛рдорд╛рдиреНрдп рдЗрдирдкреБрдЯ рдлрд╝реАрд▓реНрдб рдкрд╣рд▓реЗ рд╕реЗ рд╣реА рдПрдХ рдХреНрд▓рд┐рдХ рдХрд╛ рдЬрд╡рд╛рдм рджреЗрддреА рд╣реИ, рдФрд░ рдпрджрд┐ рдЖрдк label рдХреЗ рд▓рд┐рдП рд╡рд┐рд╢реЗрд╖рддрд╛ рдирд┐рд░реНрджрд┐рд╖реНрдЯ рдХрд░рддреЗ рд╣реИрдВ, рддреЛ рд▓реЗрдмрд▓ рд╕рдХреНрд░рд┐рдп рд╣реЛ рдЬрд╛рддрд╛ рд╣реИ, рд▓реЗрдХрд┐рди рдмрдбрд╝реА рдЖрдпрдд рдореЗрдВ рдХреБрдЫ рдмрд╣реБрдд рдЖрдХрд░реНрд╖рдХ рд╣реИ рдЬреЛ рдЖрдкрдХреЛ рдЙрд╕ рдкрд░ рдХреНрд▓рд┐рдХ рдХрд░рдиреЗ рдФрд░ рдЯрд╛рдЗрдк рдХрд░рдирд╛ рд╢реБрд░реВ рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП рдЖрдордВрддреНрд░рд┐рдд рдХрд░рддрд╛ рд╣реИред рдпрд╣ рдореЛрдмрд╛рдЗрд▓ рдПрдкреНрд▓рд┐рдХреЗрд╢рди рдХреЗ рд▓рд┐рдП рд╡рд┐рд╢реЗрд╖ рд░реВрдк рд╕реЗ рдЕрдЪреНрдЫрд╛ рд╣реИред

рд╣рд╛рд▓рд╛рдВрдХрд┐ рд╕рд╛рдорд╛рдиреНрдп рд╕реНрдерд┐рддрд┐ рдореЗрдВ, рд▓рдЧрд╛рддрд╛рд░ рджрд┐рдЦрд╛рдИ рджреЗрдиреЗ рд╡рд╛рд▓реЗ рд▓реЗрдмрд▓ рдмреЗрд╣рддрд░ рд╣реЛрддреЗ рд╣реИрдВ, рд▓реЗрдХрд┐рди рдпрджрд┐ рдЗрд╕реЗ рд╕рд╣реА рддрд░реАрдХреЗ рд╕реЗ рд▓рд╛рдЧреВ рдХрд┐рдпрд╛ рдЬрд╛рдП, рддреЛ рдпрд╣ рддрдХрдиреАрдХ рдХрднреА-рдХрднреА рдЙрдкрдпреБрдХреНрдд рд╣реЛ рд╕рдХрддреА рд╣реИред рд╣рд╛рд▓рд╛рдВрдХрд┐, рдПрдХреНрд╕реЗрд╕рд┐рдмрд┐рд▓рд┐рдЯреА рдореЗрдВ рдЧрдбрд╝рдмрдбрд╝реА рдХрд╛ рдЦрддрд░рд╛ рд╣рдореЗрд╢рд╛ рдмрдирд╛ рд░рд╣рддрд╛ рд╣реИ, рдЗрд╕рд▓рд┐рдП рд╕рд╛рд╡рдзрд╛рди рд░рд╣реЗрдВред рдЗрд╕ рджреГрд╖реНрдЯрд┐рдХреЛрдг рдХрд╛ рдПрдХ рдФрд░ рджреЛрд╖ рдпрд╣ рд╣реИ рдХрд┐ рдЖрдк рдЙрд╕ рдкреНрд▓реЗрд╕рд╣реЛрд▓реНрдбрд░ рдореЗрдВ рдЬрд╛рдирдХрд╛рд░реА рдирд╣реАрдВ рд░рдЦ рд╕рдХрддреЗ рд╣реИрдВ рдЬреЛ рд▓реЗрдмрд▓ рдХреЛ рдкреВрд░рдХ рдХрд░рддрд╛ рд╣реИ (рдЙрджрд╛рд╣рд░рдг рдХреЗ рд▓рд┐рдП, рд▓реЗрдмрд▓ "рдлреЛрди рдирдВрдмрд░" рд╣реИ рдФрд░ рд╕рдВрдХреЗрдд рд╣реИ "(555) 555-5555")ред

рдЯреНрд░рд┐рдХ # 1 - рдПрдХ рд╕рдВрдХреЗрдд рдХреЗ рд░реВрдк рдореЗрдВ рдЯреИрдЧ


рддрддреНрд╡реЛрдВ
     (    ,           )   .       ,   ,         .     ,     ,     ,      . 

рдЫрд╡рд┐
HTML:
<div> <input id="name" name="name" type="text" required> <label for="name">Your Name</label> </div>


CSS:
form > div { position: relative; } form > div > label { position: absolute; }

тДЦ2 - :focus
, for . , , :focus (+), , . , .

CSS:
input:focus + label { /* - */ }

, . , . : , - .

form.go-bottom label { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; transition: 0.2s; } form.go-bottom input:focus + label top: 100%; margin-top: -16px; }
тДЦ3 - :valid
- , , , . , CSS :valid , , . , , - . :

<input type="text" required>

, , . , :

form input:valid { background: white; }
- , .


. , :

рдЫрд╡рд┐
, . JavaScript: , , maman . , , , . CodePen.

( , ) . , , . , , , .

рдЫрд╡рд┐
HTML:
<div> <input id="name" name="name" type="text" required> <label for="name">Your Name</label> </div>


CSS:
form > div { position: relative; } form > div > label { position: absolute; }

тДЦ2 - :focus
, for . , , :focus (+), , . , .

CSS:
input:focus + label { /* - */ }

, . , . : , - .

form.go-bottom label { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; transition: 0.2s; } form.go-bottom input:focus + label top: 100%; margin-top: -16px; }
тДЦ3 - :valid
- , , , . , CSS :valid , , . , , - . :

<input type="text" required>

, , . , :

form input:valid { background: white; }
- , .


. , :

рдЫрд╡рд┐
, . JavaScript: , , maman . , , , . CodePen.

     (    ,           )   .       ,   ,         .     ,     ,     ,      . 

рдЫрд╡рд┐
HTML:
<div> <input id="name" name="name" type="text" required> <label for="name">Your Name</label> </div>


CSS:
form > div { position: relative; } form > div > label { position: absolute; }

тДЦ2 - :focus
, for . , , :focus (+), , . , .

CSS:
input:focus + label { /* - */ }

, . , . : , - .

form.go-bottom label { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; transition: 0.2s; } form.go-bottom input:focus + label top: 100%; margin-top: -16px; }
тДЦ3 - :valid
- , , , . , CSS :valid , , . , , - . :

<input type="text" required>

, , . , :

form input:valid { background: white; }
- , .


. , :

рдЫрд╡рд┐
, . JavaScript: , , maman . , , , . CodePen.

( , ) . , , . , , , .

рдЫрд╡рд┐
HTML:
<div> <input id="name" name="name" type="text" required> <label for="name">Your Name</label> </div>


CSS:
form > div { position: relative; } form > div > label { position: absolute; }

тДЦ2 - :focus
, for . , , :focus (+), , . , .

CSS:
input:focus + label { /* - */ }

, . , . : , - .

form.go-bottom label { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; transition: 0.2s; } form.go-bottom input:focus + label top: 100%; margin-top: -16px; }
тДЦ3 - :valid
- , , , . , CSS :valid , , . , , - . :

<input type="text" required>

, , . , :

form input:valid { background: white; }
- , .


. , :

рдЫрд╡рд┐
, . JavaScript: , , maman . , , , . CodePen.

( , ) . , , . , , , .

рдЫрд╡рд┐
HTML:
<div> <input id="name" name="name" type="text" required> <label for="name">Your Name</label> </div>


CSS:
form > div { position: relative; } form > div > label { position: absolute; }

тДЦ2 - :focus
, for . , , :focus (+), , . , .

CSS:
input:focus + label { /* - */ }

, . , . : , - .

form.go-bottom label { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; transition: 0.2s; } form.go-bottom input:focus + label top: 100%; margin-top: -16px; }
тДЦ3 - :valid
- , , , . , CSS :valid , , . , , - . :

<input type="text" required>

, , . , :

form input:valid { background: white; }
- , .


. , :

рдЫрд╡рд┐
, . JavaScript: , , maman . , , , . CodePen.

( , ) . , , . , , , .

рдЫрд╡рд┐
HTML:
<div> <input id="name" name="name" type="text" required> <label for="name">Your Name</label> </div>


CSS:
form > div { position: relative; } form > div > label { position: absolute; }

тДЦ2 - :focus
, for . , , :focus (+), , . , .

CSS:
input:focus + label { /* - */ }

, . , . : , - .

form.go-bottom label { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; transition: 0.2s; } form.go-bottom input:focus + label top: 100%; margin-top: -16px; }
тДЦ3 - :valid
- , , , . , CSS :valid , , . , , - . :

<input type="text" required>

, , . , :

form input:valid { background: white; }
- , .


. , :

рдЫрд╡рд┐
, . JavaScript: , , maman . , , , . CodePen.

     (    ,           )   .       ,   ,         .     ,     ,     ,      . 

рдЫрд╡рд┐
HTML:
<div> <input id="name" name="name" type="text" required> <label for="name">Your Name</label> </div>


CSS:
form > div { position: relative; } form > div > label { position: absolute; }

тДЦ2 - :focus
, for . , , :focus (+), , . , .

CSS:
input:focus + label { /* - */ }

, . , . : , - .

form.go-bottom label { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; transition: 0.2s; } form.go-bottom input:focus + label top: 100%; margin-top: -16px; }
тДЦ3 - :valid
- , , , . , CSS :valid , , . , , - . :

<input type="text" required>

, , . , :

form input:valid { background: white; }
- , .


. , :

рдЫрд╡рд┐
, . JavaScript: , , maman . , , , . CodePen.

( , ) . , , . , , , .

рдЫрд╡рд┐
HTML:
<div> <input id="name" name="name" type="text" required> <label for="name">Your Name</label> </div>


CSS:
form > div { position: relative; } form > div > label { position: absolute; }

тДЦ2 - :focus
, for . , , :focus (+), , . , .

CSS:
input:focus + label { /* - */ }

, . , . : , - .

form.go-bottom label { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; transition: 0.2s; } form.go-bottom input:focus + label top: 100%; margin-top: -16px; }
тДЦ3 - :valid
- , , , . , CSS :valid , , . , , - . :

<input type="text" required>

, , . , :

form input:valid { background: white; }
- , .


. , :

рдЫрд╡рд┐
, . JavaScript: , , maman . , , , . CodePen.

     (    ,           )   .       ,   ,         .     ,     ,     ,      . 

рдЫрд╡рд┐
HTML:
<div> <input id="name" name="name" type="text" required> <label for="name">Your Name</label> </div>


CSS:
form > div { position: relative; } form > div > label { position: absolute; }

тДЦ2 - :focus
, for . , , :focus (+), , . , .

CSS:
input:focus + label { /* - */ }

, . , . : , - .

form.go-bottom label { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; transition: 0.2s; } form.go-bottom input:focus + label top: 100%; margin-top: -16px; }
тДЦ3 - :valid
- , , , . , CSS :valid , , . , , - . :

<input type="text" required>

, , . , :

form input:valid { background: white; }
- , .


. , :

рдЫрд╡рд┐
, . JavaScript: , , maman . , , , . CodePen.

( , ) . , , . , , , .

рдЫрд╡рд┐
HTML:
<div> <input id="name" name="name" type="text" required> <label for="name">Your Name</label> </div>


CSS:
form > div { position: relative; } form > div > label { position: absolute; }

тДЦ2 - :focus
, for . , , :focus (+), , . , .

CSS:
input:focus + label { /* - */ }

, . , . : , - .

form.go-bottom label { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; transition: 0.2s; } form.go-bottom input:focus + label top: 100%; margin-top: -16px; }
тДЦ3 - :valid
- , , , . , CSS :valid , , . , , - . :

<input type="text" required>

, , . , :

form input:valid { background: white; }
- , .


. , :

рдЫрд╡рд┐
, . JavaScript: , , maman . , , , . CodePen.

( , ) . , , . , , , .

рдЫрд╡рд┐
HTML:
<div> <input id="name" name="name" type="text" required> <label for="name">Your Name</label> </div>


CSS:
form > div { position: relative; } form > div > label { position: absolute; }

тДЦ2 - :focus
, for . , , :focus (+), , . , .

CSS:
input:focus + label { /* - */ }

, . , . : , - .

form.go-bottom label { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; transition: 0.2s; } form.go-bottom input:focus + label top: 100%; margin-top: -16px; }
тДЦ3 - :valid
- , , , . , CSS :valid , , . , , - . :

<input type="text" required>

, , . , :

form input:valid { background: white; }
- , .


. , :

рдЫрд╡рд┐
, . JavaScript: , , maman . , , , . CodePen.

( , ) . , , . , , , .

рдЫрд╡рд┐
HTML:
<div> <input id="name" name="name" type="text" required> <label for="name">Your Name</label> </div>


CSS:
form > div { position: relative; } form > div > label { position: absolute; }

тДЦ2 - :focus
, for . , , :focus (+), , . , .

CSS:
input:focus + label { /* - */ }

, . , . : , - .

form.go-bottom label { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; transition: 0.2s; } form.go-bottom input:focus + label top: 100%; margin-top: -16px; }
тДЦ3 - :valid
- , , , . , CSS :valid , , . , , - . :

<input type="text" required>

, , . , :

form input:valid { background: white; }
- , .


. , :

рдЫрд╡рд┐
, . JavaScript: , , maman . , , , . CodePen.

     (    ,           )   .       ,   ,         .     ,     ,     ,      . 

рдЫрд╡рд┐
HTML:
<div> <input id="name" name="name" type="text" required> <label for="name">Your Name</label> </div>


CSS:
form > div { position: relative; } form > div > label { position: absolute; }

тДЦ2 - :focus
, for . , , :focus (+), , . , .

CSS:
input:focus + label { /* - */ }

, . , . : , - .

form.go-bottom label { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; transition: 0.2s; } form.go-bottom input:focus + label top: 100%; margin-top: -16px; }
тДЦ3 - :valid
- , , , . , CSS :valid , , . , , - . :

<input type="text" required>
, , . , :

form input:valid { background: white; }
- , .


. , :

рдЫрд╡рд┐
, . JavaScript: , , maman . , , , . CodePen.

( , ) . , , . , , , .

рдЫрд╡рд┐
HTML:
<div> <input id="name" name="name" type="text" required> <label for="name">Your Name</label> </div>


CSS:
form > div { position: relative; } form > div > label { position: absolute; }

тДЦ2 - :focus
, for . , , :focus (+), , . , .

CSS:
input:focus + label { /* - */ }

, . , . : , - .

form.go-bottom label { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; transition: 0.2s; } form.go-bottom input:focus + label top: 100%; margin-top: -16px; }
тДЦ3 - :valid
- , , , . , CSS :valid , , . , , - . :

<input type="text" required>

, , . , :

form input:valid { background: white; }
- , .


. , :

рдЫрд╡рд┐
, . JavaScript: , , maman . , , , . CodePen.

     (    ,           )   .       ,   ,         .     ,     ,     ,      . 

рдЫрд╡рд┐
HTML:
<div> <input id="name" name="name" type="text" required> <label for="name">Your Name</label> </div>


CSS:
form > div { position: relative; } form > div > label { position: absolute; }

тДЦ2 - :focus
, for . , , :focus (+), , . , .

CSS:
input:focus + label { /* - */ }

, . , . : , - .

form.go-bottom label { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; transition: 0.2s; } form.go-bottom input:focus + label top: 100%; margin-top: -16px; }
тДЦ3 - :valid
- , , , . , CSS :valid , , . , , - . :

<input type="text" required>

, , . , :

form input:valid { background: white; }
- , .


. , :

рдЫрд╡рд┐
, . JavaScript: , , maman . , , , . CodePen.

( , ) . , , . , , , .

рдЫрд╡рд┐
HTML:
<div> <input id="name" name="name" type="text" required> <label for="name">Your Name</label> </div>


CSS:
form > div { position: relative; } form > div > label { position: absolute; }

тДЦ2 - :focus
, for . , , :focus (+), , . , .

CSS:
input:focus + label { /* - */ }

, . , . : , - .

form.go-bottom label { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; transition: 0.2s; } form.go-bottom input:focus + label top: 100%; margin-top: -16px; }
тДЦ3 - :valid
- , , , . , CSS :valid , , . , , - . :

<input type="text" required>

, , . , :

form input:valid { background: white; }
- , .


. , :

рдЫрд╡рд┐
, . JavaScript: , , maman . , , , . CodePen.

( , ) . , , . , , , .

рдЫрд╡рд┐
HTML:
<div> <input id="name" name="name" type="text" required> <label for="name">Your Name</label> </div>


CSS:
form > div { position: relative; } form > div > label { position: absolute; }

тДЦ2 - :focus
, for . , , :focus (+), , . , .

CSS:
input:focus + label { /* - */ }

, . , . : , - .

form.go-bottom label { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; transition: 0.2s; } form.go-bottom input:focus + label top: 100%; margin-top: -16px; }
тДЦ3 - :valid
- , , , . , CSS :valid , , . , , - . :

<input type="text" required>

, , . , :

form input:valid { background: white; }
- , .


. , :

рдЫрд╡рд┐
, . JavaScript: , , maman . , , , . CodePen.

( , ) . , , . , , , .

рдЫрд╡рд┐
HTML:
<div> <input id="name" name="name" type="text" required> <label for="name">Your Name</label> </div>


CSS:
form > div { position: relative; } form > div > label { position: absolute; }

тДЦ2 - :focus
, for . , , :focus (+), , . , .

CSS:
input:focus + label { /* - */ }

, . , . : , - .

form.go-bottom label { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; transition: 0.2s; } form.go-bottom input:focus + label top: 100%; margin-top: -16px; }
тДЦ3 - :valid
- , , , . , CSS :valid , , . , , - . :

<input type="text" required>

, , . , :

form input:valid { background: white; }
- , .


. , :

рдЫрд╡рд┐
, . JavaScript: , , maman . , , , . CodePen.

( , ) . , , . , , , .

рдЫрд╡рд┐
HTML:
<div> <input id="name" name="name" type="text" required> <label for="name">Your Name</label> </div>


CSS:
form > div { position: relative; } form > div > label { position: absolute; }

тДЦ2 - :focus
, for . , , :focus (+), , . , .

CSS:
input:focus + label { /* - */ }

, . , . : , - .

form.go-bottom label { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; transition: 0.2s; } form.go-bottom input:focus + label top: 100%; margin-top: -16px; }
тДЦ3 - :valid
- , , , . , CSS :valid , , . , , - . :

<input type="text" required>

, , . , :

form input:valid { background: white; }
- , .


. , :

рдЫрд╡рд┐
, . JavaScript: , , maman . , , , . CodePen.

Source: https://habr.com/ru/post/In216669/


All Articles