markdown HTML.CSS.JS.Forms.form最佳实践1 Posted 2021-05-05
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown HTML.CSS.JS.Forms.form最佳实践1相关的知识,希望对你有一定的参考价值。
fieldset {
padding:10px;
border-radius:10px;
}
label {
display:inline-block;
margin-bottom:10px;
}
input {
float:right;
margin-right:70px;
width:150px;
}
input:invalid {
background-color:pink;
}
input:valid {
background-color:lightgreen;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Form example</title>
</head>
<body>
<form id="myForm">
<fieldset>
<legend>Personal informations</legend>
<label for="givenName">Given name:</label>
<input type="text" id="givenName" required name="givenName">
<br>
<label for="familyName">Family name:</label>
<input type="text" id="familyName" required name="familyName">
<br>
<label for="email">Email:</label>
<input type="email" id="email" required name="email">
<br>
<label for="age">Age:</label>
<input type="number" min=0 max=120 step=5 id="age" required name="age">
<br>
<label for="date">Birth date:</label>
<input type="date" id="date" required name="date">
</fieldset>
<button>Submit form</button>
</form>
</body>
</html>
HTML.CSS.JS.Forms.form best practice 1
--------------------------------------
A [Pen](https://codepen.io/Onlyforbopi/pen/ZMgVrV) by [Pan Doul](https://codepen.io/Onlyforbopi) on [CodePen](https://codepen.io).
[License](https://codepen.io/Onlyforbopi/pen/ZMgVrV/license).
以上是关于markdown HTML.CSS.JS.Forms.form最佳实践1的主要内容,如果未能解决你的问题,请参考以下文章
转换rst到markdown总结
markdown [Markdown HowTo]作为Markdown语法的秘籍
python markdown干啥用的
markdown前端渲染
如何用markdown生成目录
markdown排版示例