Created
January 29, 2012 16:12
-
-
Save machal/1699466 to your computer and use it in GitHub Desktop.
Dabblet: Testing HTML5 input attributes (placeholder, required, pattern)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Dabblet: Testing HTML5 input attributes (placeholder, required, pattern) | |
| * and CSS3 styling of required | |
| */ | |
| input[required] { | |
| border: 3px solid #333; | |
| } | |
| input[required]:invalid:focus { | |
| background-color: pink; | |
| } | |
| body { | |
| background: #ccc; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <form action="#"> | |
| <p><input placeholder="Vaše jméno" required> | |
| <p><input placeholder="Vaše domena.cz" required pattern="^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$"> | |
| <p><input type="submit"> | |
| </form> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"view":"split","prefixfree":"1","page":"html"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment