Pen Settings



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


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


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.


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.


                <!doctype html>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="style.css">
    <script src="" integrity="sha256-DZAnKJ/6XZ9si04Hgrsxu/8s717jcIzLy3oi35EouyE=" crossorigin="anonymous"></script>
      <div class="form form-name">
        <label>お名前 :</label>
        <input class="tooltiper nameCheck" type="text" placeholder="田中 太郎">
        <span class="tooltipMsg">名字と名前の間はスペースをあけてください</span>
      <div class="form form-tel">
        <input class="tooltiper telCheck" type="text" placeholder="080-1234-5678">
        <span class="tooltipMsg">必ず入力してください</span>
      <div class="form form-mail">
        <label>メール :</label>
        <input class="tooltiper mailCheck" type="text" placeholder="">
        <span class="tooltipMsg">メールでの連絡をご希望の方は記入してください</span>
      <input type="submit" value="送信する">
    <script src="app.js"></script>


                input:focus::placeholder {
  color: transparent;
  transition: .2s;
.form {
    width: 300px;
form span.tooltipMsg {
  position: relative;
  display: inline-block;
  margin: 1.2em 0;
  padding: 0px 10px;
  min-width: 120px;
  max-width: 100%;
  color: white;
  font-size: 12px;
  background: rgb(120, 120, 120);
  border-radius: 5px;
  box-shadow: 0px 1px 2px 0 rgb(120, 120, 120);
  z-index: 10000;
  display: none;
form span.tooltipMsg:before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -15px;
  border: 8px solid transparent;
  border-top: 8px solid rgb(120, 120, 120);
.alert__name, .alert__tel, .alert__mail {
  font-size: 12px;
  color: rgb(219, 46, 48);
  margin-left: 75px;
.form-name, .form-tel, .form-mail, .form-other {
  position: relative;
.form-name span.tooltipMsg {
  position: absolute;
  left: 10%;
  bottom: 75%;
.form-tel span.tooltipMsg {
  position: absolute;
  left: 30%;
  bottom: 75%;
.form-mail span.tooltipMsg {
  position: absolute;
  left: 5%;
  bottom: 75%;



                $('form .form').each(function() {
    var formVal = $(this)
    formVal.find('.tooltiper').focus(function() {
$('.tooltiper').blur(function() {
function validation_check(e) {
  if($("[class$='Check']")[0] === e[0]) {
  } else if($("[class$='Check']")[1] === e[0]) {
  } else if($("[class$='Check']")[2] === e[0]) {
function name_checker(e) {
  if(e.val() == '') {
    create_errmsg(e, 'name', ' 名前が入力されてません')
  } else {
    $(".alert__name").prev().css('border-color', '#cccccc')
function tel_checker(e) {
  var tel = e.val().replace(/[━.*‐.*―.*-.*\-.*ー.*\-]/gi,'')
  if(!tel.match(/^(0[5-9]0[0-9]{8}|0[1-9][1-9][0-9]{7})$/)) {
    create_errmsg(e, 'tel', ' 電話番号が正しくありません')
  } else {
    $(".alert__tel").prev().css('border-color', '#cccccc')
function mail_checker(e) {
  if(e.val().match(/.+@.+\..+/)==null) {
    create_errmsg(e, 'mail', ' メールアドレスが正しくありません')
  } else {
    $(".alert__mail").prev().css('border-color', '#cccccc')
function create_errmsg(obj, key, msg) {
  if(!($('.alert__' + key).length)) {
    var html = '<div class="alert__' + key + '">' + msg + '</div>'
    obj.css('border-color', 'rgb(219, 46, 48)')