Skip to content

Instantly share code, notes, and snippets.

@matsumana07384
Created October 7, 2020 06:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matsumana07384/fbc691f3456e8b0b220ec2b0f5d8808c to your computer and use it in GitHub Desktop.
Save matsumana07384/fbc691f3456e8b0b220ec2b0f5d8808c to your computer and use it in GitHub Desktop.
Form_Sample
<div class="main-section">
<h1 class="title">フォームサンプル</h1>
<form id="contact" action="" method="post">
<div class="input-block">
<p>通常のinput</p>
<fieldset>
<label>名前:</label>
<input placeholder="名字" type="text" tabindex="1"autocomplete="family-name">
<input placeholder="名前" type="text" tabindex="1"autocomplete="given-name">
</fieldset>
</div>
<hr>
<div class="input-block">
<p>type="name"</p>
<fieldset>
<label>生年月日:</label>
<input type="date">
</fieldset>
<p>type="number"</p>
<fieldset>
<label>生年月日:</label>
<input placeholder="年" type="number" name="year" id="year" maxlength="4" autocomplate="bday-year">年
<input placeholder="月" type="number" name="month" id="month" maxlength="2" autocomplate="bday-month">月
<input placeholder="日" type="number" name="day" id="day" maxlength="2">日
</fieldset>
</div>
<hr>
<div class="input-block">
<p>type="number"</p>
<fieldset>
<label>電話番号:</label>
<input placeholder="電話番号" type="number" name="tel" id="tel" autocomplete="tel">
</fieldset>
<fieldset>
<label>電話番号:</label>
<input placeholder="電話番号" type="tel" name="tel" id="tel" autocomplete="tel-local">
</fieldset>
</div>
<div class="input-block">
<p>type="color"</p>
<input type="color" name="color">
<fieldset>
</fieldset>
</div>
</form>
</div>
.main-section {
vertical-align: middle;
text-align: center;
margin: 0 auto;
}
fieldset {
border:0 none;
}
.input-block {
border
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment