Home >Web Front-end >CSS Tutorial >What does submit mean in css
In CSS, submit means submission. When the button is clicked, the user information form will be submitted to the remote database; syntax "type="submit"". The type attribute can return the form element type of the confirmation button. When the value is submit, it means that the button is a confirmation button.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
The Submit object represents a submit button (submitbutton) in an HTML form. Every time the tag appears in an HTML form, a Submit object is created.
Before the form is submitted, the onclick event handle is triggered, and a handler can cancel the form submission by returning false.
Example
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>document</title> </head> <style> input[type="text"], select { width: 100%; padding: 12px 20px; margin: 8px 0; display: inline-block; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; } input[type="submit"] { width: 100%; background-color: #4caf50; color: white; padding: 14px 20px; margin: 8px 0; border: none; border-radius: 4px; cursor: pointer; } input[type="submit"]:hover { background-color: #45a049; } div { border-radius: 5px; background-color: #f2f2f2; padding: 20px; } </style> <body> <h3>使用 CSS 来渲染 HTML 的表单元素</h3> <div> <form action="/action_page.php"> <label for="fname">First Name</label> <input type="text" id="fname" name="firstname" placeholder="Your name.." /> <label for="lname">Last Name</label> <input type="text" id="lname" name="lastname" placeholder="Your last name.." /> <label for="country">Country</label> <select id="country" name="country"> <option value="australia">Australia</option> <option value="canada">Canada</option> <option value="usa">USA</option> </select> <input type="submit" value="Submit" /> </form> </div> </body> </html>
Effect:
The above is the detailed content of What does submit mean in css. For more information, please follow other related articles on the PHP Chinese website!