Created
May 16, 2017 12:32
-
-
Save vitkarpov/1b26f578273ca1c732c0aff440adc426 to your computer and use it in GitHub Desktop.
Untitled
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.my-fancy-input { | |
position: relative; | |
width: 160px; | |
height: 20px; | |
border: 1px solid black; | |
} | |
.my-fancy-input input { | |
position: absolute; | |
background: transparent; | |
box-sizing: border-box; | |
width: 160px; | |
height: 20px; | |
border: 0; | |
padding: 0 6px; | |
font-size: 18px; | |
letter-spacing: 9px; | |
} | |
.my-fancy-input-square { | |
position: absolute; | |
left: 0; | |
top: 0; | |
width: 20px; | |
height: 20px; | |
border-left: 1px solid black; | |
} | |
.my-fancy-input-square:nth-child(1) { left: 0; border-left: 0; } | |
.my-fancy-input-square:nth-child(2) { left: 20px; } | |
.my-fancy-input-square:nth-child(3) { left: 40px; } | |
.my-fancy-input-square:nth-child(4) { left: 60px; } | |
.my-fancy-input-square:nth-child(5) { left: 80px; } | |
.my-fancy-input-square:nth-child(6) { left: 100px; } | |
.my-fancy-input-square:nth-child(7) { left: 120px; } | |
.my-fancy-input-square:nth-child(8) { left: 140px; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="my-fancy-input"> | |
<div class="my-fancy-input-square"></div> | |
<div class="my-fancy-input-square"></div> | |
<div class="my-fancy-input-square"></div> | |
<div class="my-fancy-input-square"></div> | |
<div class="my-fancy-input-square"></div> | |
<div class="my-fancy-input-square"></div> | |
<div class="my-fancy-input-square"></div> | |
<div class="my-fancy-input-square"></div> | |
<input type="text" value="12345678" readonly> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// alert('Hello world!'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment