Modal in pure html and css

by zerrax

HTML

<a href="#addemail">Open Modal</a>

<div id="addemail" class="modalDialog">
  <div> <a href="#close" title="Close" class="close">X</a>
    <div class="container">
      <div class="tab-container">
        <label class="tab-title" for="tab-1">Email</label>
        <label class="tab-title" for="tab-2">Tab #2</label>
        <label class="tab-title" for="tab-3">Tab #3</label>
        <input type="radio" name="tab" class="hide" id="tab-1" checked>

        <form  class="t" action="action_page.php">

          <label for="fname">Name
            <input type="text" id="fname" name="name" placeholder="1"></label>
          <label for="email">Email
            <select id="email" name="email">
              <option value="email">email</option>
              <option value="email">email</option>
              <option value="email">email</option>
            </select>
          </label>
          <label for="lname">type
            <select id="lname" name="country">
              <option value="B">Buy</option>
              <option value="S">Sell</option>
              <option value="BAS">Buy And Sell</option>
            </select>
          </label>
          <label for="lname">Use TradingView Selectors ?
            <select id="lname" name="country">
              <option value="tvy">Yes</option>
              <option value="tvn">No</option>
            </select>
            <label for="fselec">Custom Selectors
              <input type="text" id="fselec" name="fselec" placeholder="{binance:btcusdt} -buy -sell #limit #makert"></label>
          </label>
          <a class="help" href="#">Help ?</a>

          <input type="submit" value="Submit">

        </form>
        <input type="radio" name="tab" class="hide" id="tab-2">

        <form class="t" action="action_page.php">

          <label for="fname">Name
            <input type="text" id="fname" name="name" placeholder="2"></label>
          <label for="email">Email
            <select id="email" name="email">
       ...

CSS

.modalDialog {
  position: fixed;
  font-family: Arial, Helvetica, sans-serif;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 99999;
  opacity: 0;
  -webkit-transition: opacity 400ms ease-in;
  -moz-transition: opacity 400ms ease-in;
  transition: opacity 400ms ease-in;
  pointer-events: none;
}

.modalDialog:target {
  opacity: 1;
  pointer-events: auto;
}

.modalDialog>div {
  width: 480px;
  position: relative;
  margin: 10% auto;
  padding: 5px 20px 13px 20px;
  border-radius: 10px;
  background: #f2f2f2;

}

.close {
  background: #606061;
  color: #FFFFFF;
  line-height: 25px;
  position: absolute;
  right: -12px;
  text-align: center;
  top: -10px;
  width: 24px;
  text-decoration: none;
  font-weight: bold;
  -webkit-border-radius: 12px;
  -moz-border-radius: 12px;
  border-radius: 12px;
  -moz-box-shadow: 1px 1px 3px #000;
  -webkit-box-shadow: 1px 1px 3px #000;
  box-shadow: 1px 1px 3px #000;
}

.close:hover {
  background: #00d9ff;
}

/* Style inputs with type="text", select elements and textareas */
.container form input[type=text],
select,
textarea {
  width: 100%;
  /* Full width */
  padding: 12px;
  /* Some padding */
  border: 1px solid #ccc;
  /* Gray border */
  border-radius: 4px;
  /* Rounded borders */
  box-sizing: border-box;
  /* Make sure that padding and width stays in place */
  margin-top: 6px;
  /* Add a top margin */
  margin-bottom: 16px;
  /* Bottom margin */
  resize: vertical
    /* Allow the user to vertically resize the textarea (not horizontally) */
}

/* Style the submit button with a specific background color etc */
.container form input[type=submit] {
  background-color: #4CAF50;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* When moving the mouse over the submit button, add a darker green color */
.container form input[type=submit]:hover {
  background-color: #45a049;
}

.container form label {
  display: block
}

.container...