Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<form action="post">
  <button type="button" id="entry_conf" class="a-btn b-blu big_btn modal-open">内容確認</button>

  <div class="modal-container">
    <div class="modal-body">
      <div class="modal-close modal-button">×</div>
      <div class="modal-content">
        <h2>送信内容の確認</h2>
        <table class="form-table small mb-1">
          <tbody>
            <tr>
              <th>お名前</th>
              <td>確認 太郎</td>
            </tr>
            <tr>
              <th>メールアドレス</th>
              <td>sample@sample.com</td>
            </tr>
            <tr>
              <th>電話番号</th>
              <td>000-0000-0000</td>
            </tr>
          </tbody>
        </table>

        <div class="d-flex space-around">
          <button type="button" class="a-btn b-grn-rv middle_btn modal-close">戻る</button>
          <button type="button" id="entry_send" class="a-btn b-blu middle_btn">送信</button>
        </div>
      </div>
    </div>
  </div>
</form>
              
            
!

CSS

              
                .modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    background: rgba(0, 0, 0, 50%);
    padding: 40px 20px;
    overflow: auto;
    opacity: 0;
    visibility: hidden;
    transition: .3s;
    box-sizing: border-box;
    z-index: 999999;
  }

  .modal-container.active {
    opacity: 1;
    visibility: visible;
  }

  .modal-body {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    max-width: 700px;
    width: 90%;
  }

  .modal-button {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    top: -40px;
    right: -40px;
    width: 40px;
    height: 40px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
  }

  .modal-content {
    background: #fff;
    text-align: left;
    padding: 30px;
    overflow: auto;
    max-height: 700px;
  }


  .a-btn.middle_btn {
    padding: 16px 4vw;
    font-size: 1.2rem;
    margin: 20px auto;
  }

  .a-btn {
    display: inline-block;
    width: auto;
    padding: 8px 5vw;
    text-decoration: none;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
  }

  .b-grn-rv {
    background-color: white;
    color: #52AB84;
    border: #52AB84 3px solid;
  }

  .b-grn-rv:hover {
    background-color: #52AB84;
    color: white;
    border: #52AB84 3px solid;
  }

  .b-blu {
    background-color: #416FAC;
    color: white;
    border: #416FAC 3px solid;
  }

  .b-blu:hover {
    background-color: white;
    color: #416FAC;
    border: #416FAC 3px solid;
  }

  .d-flex {
    display: flex;
    flex-wrap: wrap;
  }

  .space-around {
    justify-content: space-around;
  }

  .form-table tr:nth-child(odd) {
    background-color: #f7f7f7;
  }

  .form-table tr th,
  .form-table tr td {
    padding: 25px;
    vertical-align: middle;
  }

  .form-table {
    table-layout: fixed;
    width: 100%;
  }

  .form-table tr th {
    width: 30%;
    text-align: left;
  }

  .form-table tr td {
    width: 70%;
  }

  .form-table tr th label {
    font-weight: bold;
  }
              
            
!

JS

              
                $(document).ready(function () {

    var close = $('.modal-close'),
      container = $('.modal-container');

    var error = "";
    $('#entry_conf').click(function () {
      if (error != "") {
        return false;
      } else {
        container.addClass('active');
        $('#entry_send').attr("type", "submit");
        return false;
      }
    });

    close.on('click', function () {
      container.removeClass('active');
    });

    $(document).on('click', function (e) {
      if (!$(e.target).closest('.modal-body').length) {
        container.removeClass('active');
      }
    });

  });
              
            
!
999px

Console