Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <h1>お問い合わせフォーム</h1>
<div class="form-wrapper">
<ul class="step">
<li class="step-current">ステップ1<span>入力画面</span></li>
<li>ステップ2<span>確認画面</span></li>
<li>ステップ3<span>完了画面</span></li>
</ul>
<form class="g-form" action="#" method="post">
<dl>
<dt>お名前<span>必須</span></dt><dd><input type="text" name="name" required placeholder="お名前をご入力下さい"></dd>
<dt>メールアドレス<span>必須</span></dt><dd><input type="email" name="email" required></dd>

<dt>お問い合わせ項目<span>必須</span></dt>
<dd>
<p><label for="item1"><input type="radio" name="item" value="サービス" id="item1" required><span>サービスについて</span></label></p>
<p><label for="item2"><input type="radio" name="item" value="採用" id="item2"><span>採用に関するお問い合わせ</span></label></p>
<p><label for="item3"><input type="radio" name="item" value="資料請求" id="item3"><span>資料請求に関するお問い合わせ</span></label></p>
<p><label for="item4"><input type="radio" name="item" value="その他" id="item4"><span>その他</span></label></p>
</dd>
<dt>お問い合わせ内容<span>必須</span></dt><dd><textarea name="message" required></textarea></dd> 
</dl>

<div class="policy-box">
<div class="policy">
<h2>プライバシーポリシー</h2>
<p>ここにプライバシーポリシーが入ります。ここにプライバシーポリシーが入ります。ここにプライバシーポリシーが入ります。ここにプライバシーポリシーが入ります。ここにプライバシーポリシーが入ります。ここにプライバシーポリシーが入ります。ここにプライバシーポリシーが入ります。ここにプライバシーポリシーが入ります。ここにプライバシーポリシーが入ります。ここにプライバシーポリシーが入ります。ここにプライバシーポリシーが入ります。ここにプライバシーポリシーが入ります。ここにプライバシーポリシーが入ります。ここにプライバシーポリシーが入ります。ここにプライバシーポリシーが入ります。</p>
</div>
<label for="policy-check" class="policy-txt"><input type="checkbox" id="policy-check" required>プライバシーポリシーの内容を確認し同意します。</label>
</div>


<div class="form-btn">
<input type="submit" value="確認画面へ">
<input type="reset" value="リセット">
</div>
</form>
</div>

              
            
!

CSS

              
                html{-webkit-text-size-adjust:100%}*,:after,:before{background-repeat:no-repeat;box-sizing:inherit}:after,:before{text-decoration:inherit;vertical-align:inherit}*{padding:0;margin:0}audio:not([controls]){display:none;height:0}hr{overflow:visible}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{display:block}summary{display:list-item}small{font-size:80%}[hidden],template{display:none}abbr[title]{border-bottom:1px dotted;text-decoration:none}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}code,kbd,pre,samp{font-family:monospace,monospace}b,strong{font-weight:bolder}dfn{font-style:italic}mark{background-color:#ff0;color:#000}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}input{border-radius:0}[role=button],[type=button],[type=reset],[type=submit],button{cursor:pointer}[disabled]{cursor:default}[type=number]{width:auto}[type=search]{-webkit-appearance:textfield}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}textarea{overflow:auto;resize:vertical}button,input,optgroup,select,textarea{font:inherit}optgroup{font-weight:700}button{overflow:visible}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:0;padding:0}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button:-moz-focusring{outline:1px dotted ButtonText}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}button,select{text-transform:none}button,input,select,textarea{background-color:transparent;border-style:none;color:inherit}select{-moz-appearance:none;-webkit-appearance:none}select::-ms-expand{display:none}select::-ms-value{color:currentColor}legend{border:0;color:inherit;display:table;max-width:100%;white-space:normal}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}img{border-style:none;vertical-align: bottom}progress{vertical-align:baseline}svg:not(:root){overflow:hidden}audio,canvas,progress,video{display:inline-block}@media screen{[hidden~=screen]{display:inherit}[hidden~=screen]:not(:active):not(:focus):not(:target){position:absolute!important;clip:rect(0 0 0 0)!important}}[aria-busy=true]{cursor:progress}[aria-controls]{cursor:pointer}[aria-disabled]{cursor:default}::-moz-selection{background-color:#b3d4fc;color:#000;text-shadow:none}::selection{background-color:#b3d4fc;color:#000;text-shadow:none}ul,ol{list-style:none;}a{text-decoration:none;}.wrapper{overflow:hidden;}body{overflow-y:scroll;}*{box-sizing:border-box;}

/* 入力画面 */
h1{
text-align: center;
font-size: 40px;
padding: 30px 0;
}
.form-wrapper{
max-width: 800px;
margin: 0 auto 100px;
}
.step{
display: flex;
margin-bottom: 100px;
justify-content:space-between;
position: relative;
}
.step::after{
display: block;
content: "";
width: 100%;
height: 4px;
background-color: #424d8a;
position: absolute;
top: 0;
bottom: 0;
margin: auto;
z-index: -1;
}
.step>li{
padding:10px 20px;
border: 2px solid #424d8a;
background-color: #FFF;
}
.step span{
font-size: 20px;
margin-left: 20px;
}
.step>li.step-current{
background-color: #424d8a;
color: #FFF;
}
.g-form>dl{
display: flex;
flex-wrap: wrap;
}
.g-form dt{
width: 40%;
text-align: right;
font-size: 18px;
font-weight: bold;
padding:10px 20px;
}
.g-form dt>span{
padding: 6px;
font-size: 14px;
background-color: #f09ea4;
margin-left: 10px;
font-weight: normal;
}
.g-form dd{
width: 60%;
margin-bottom: 40px;
padding:10px 20px;
}
[type="text"],[type="email"]{
width: 80%;
padding: 10px;
background-color: #dce4e4;
border: 1px solid #333;
border-radius: 6px;
}
.form-wrapper dd label{
display: block;
background-color: #dce4e4;
padding: 10px;
border-radius: 6px;
margin-bottom: 20px;
font-size: 18px;
}
.form-wrapper dd label:hover{
background-color: #81a5e9;
}
.form-wrapper dd label.checked{
background-color: #81a5e9;
}
[type="radio"]{
margin-right: 10px;
}
textarea{
background-color: #dce4e4;
border: 1px solid #333;
width: 100%;
height: 140px;
padding: 10px;
border-radius: 6px;
}
[type="submit"]{
width: 50%;
background-color: #f09ea4;
padding: 20px 0;
margin-right: 40px;
}
[type="reset"]{
width: 30%;
background-color: #e6e5e5;
padding: 20px 0;
}
[type="submit"]:hover{
background-color: #de7179;
}
[type="reset"]:hover{
background-color: #c9c9c9;
}
.form-btn{
max-width: 70%;
margin: 30px auto;
}
.policy-box{
max-width: 600px;
margin: 40px auto;
}
.policy{
height: 260px;
overflow-y: scroll;
padding: 40px;
border: 1px solid #333;
margin-bottom: 40px;
}
.policy>h2{
text-align: center;
margin-bottom: 40px;
}
.policy>p{
line-height: 3;
}
.policy-txt{
text-align: center;
padding: 10px;
}

/* 確認画面 */
[type="button"]{
width: 30%;
background-color: #e6e5e5;
padding: 20px 0;
}
[type="button"]:hover{
background-color: #c9c9c9;
}
.confirm-txt{
margin-bottom: 40px;
}

/* 完了画面 */


              
            
!

JS

              
                $(function(){
$('input[type=radio]').click(function(){
$(this).parent('label').addClass('checked').parent('p').siblings('p').find('label').removeClass('checked');

});
});
              
            
!
999px

Console