Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
  <div class="box">
    <input type="text" maxlength="1" required="required">
    <div class="circle"></div>
  </div>
  <div class="box">
    <input type="text" maxlength="1" required="required">
    <div class="circle"></div>
  </div>
  <div class="box">
    <input type="text" maxlength="1" required="required">
    <div class="circle"></div>
  </div>
  <div class="box">
    <input type="text" maxlength="1" required="required">
    <div class="circle"></div>
  </div>
  <div class="box">
    <input type="text" maxlength="1" required="required">
    <div class="circle"></div>
  </div>  
</body>
</html>
 
* {
  margin: 0;
  padding: 0;
}
.box {
  float: left;
  margin: 50px 10px;
  position: relative;
  width: 30px;
  height: 30px;
  border-bottom: 5px solid #fcc;
}
input {
  border: 0;
  position: absolute;
  top: 0;
  left: 0;
  z-index:999;
  width: 100%;
  height: 100%;
  text-align: center;
  background: transparent;
  opacity: 0;
}
input:focus {
  outline: 0;
}
input:valid {
  opacity: 1;
}
input:focus ~ .circle,
input:valid ~ .circle {
    display: none;
}
.circle {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fcc;
}
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers