Najlepszy samouczek Fundacja Form W 2024 r. W tym samouczku możesz dowiedzieć się
etykieta,fieldset,błąd stanu,
Fundacja Form
Fundacja kontrolą form jest automatycznie ustawiany na światowym stylu:
Wszystko <textarea>
, <select>
i <input>
szerokości elementów w 100%, a z marginesem, obicia, cień do picia efekt ruchu myszy.
Przykłady
<Form>
wejście:
<Input type = "text" placeholder = "Nazwa">
textarea:
<Textarea rows = "4" placeholder = "Adres"> </ textarea>
Wybierz:
<Wybierz>
<Option> 1 </ option>
<Option> 2 </ option>
<Option> 3 </ option>
<Option> 4 </ option>
</ Select>
</ Form>
Spróbuj »
etykieta
Skorzystaj z formularza <label>
elementów, aby ustawić etykietę, etykieta może być dodana do atrybutów i cech identyfikacyjnych. Uzyskaj pole wejściowe użytkownika w polu ostrości, gdy wejście lub kliknąć na zakładce:
Przykłady
<Form>
<Label for = "name"> Wejście
<Input type = "text" placeholder = "Nazwa" id = "name">
</ Label>
<Label for = "adr"> Label
<Textarea rows = "4" placeholder = "Adres" id = "adr"> </ textarea>
</ Label>
<Label for = "num"> Wybierz
<Wybierz id = "num">
<Option> 1 </ option>
<Option> 2 </ option>
<Option> 3 </ option>
<Option> 4 </ option>
</ Select>
</ Label>
</ Form>
Spróbuj » Jeśli trzeba ustawić kartę wyrównany do prawej, można użyć .right
kategorie:
fieldset
Fundacja Rendering <fieldset>
element stylu, co następuje:
Przykłady
<Form>
<Fieldset>
<Legenda> fieldset Legenda </ Legenda >
<Label> Nazwa
<Input type = "text" placeholder = "Imię pl">
</ Label>
<Label> Email
<Input type = "text" placeholder = "Podaj e-mail pl">
</ Label>
</ Fieldset>
</ Form>
Spróbuj »
błąd stanu
Użyj .error
klasę ustawić źle etykiety, pola tekstowe, pola wejściowe w stylu:
Przykłady
<Form>
<Class Label = "error"> Błąd
<Input type = "text" placeholder = "Nazwa pl">
</ Label>
<Small class = "error"> Źle wejście </ small>
<Textarea rows = "4" placeholder = "Adres"> </ textarea>
<Small class = "error"> Źle wejście </ small>
</ Form>
Spróbuj » | Trzeba użyć JavaScript, aby zaktualizować status błędu wprowadzania danych przez użytkownika. |
---|