The content on this website, including videos and code examples, is for educational purposes only. All demonstrations and designs are fictional and created to illustrate coding techniques. Any resemblance to existing websites or brands is purely coincidental.
The creators and administrators of this website do not claim ownership or affiliation with any existing websites or companies. Users are encouraged to use the information responsibly for learning purposes. Liability for any misuse of the content provided is not accepted.
Below is the html code for this video.
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Glass Keyboard</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="keyboard">
<div class="keyboard-row thin">
<div class="key lowercase">esc</div>
<div class="key function"><span>f1</span></div>
<div class="key function"><span>f2</span></div>
<div class="key function"><span>f3</span></div>
<div class="key function"><span>f4</span></div>
<div class="key function"><span>f5</span></div>
<div class="key function"><span>f6</span></div>
<div class="key function"><span>f7</span></div>
<div class="key function"><span>f8</span></div>
<div class="key function"><span>f9</span></div>
<div class="key function"><span>f10</span></div>
<div class="key function"><span>f11</span></div>
<div class="key function"><span>f12</span></div>
<div class="key power">⏻</div>
</div>
<div class="keyboard-row">
<div class="key double"><span>~<br>`</span></div>
<div class="key double"><span>!<br>1</span></div>
<div class="key double"><span>@<br>2</span></div>
<div class="key double"><span>#<br>3</span></div>
<div class="key double"><span>$<br>4</span></div>
<div class="key double"><span>%<br>5</span></div>
<div class="key double"><span>^<br>6</span></div>
<div class="key double"><span>&<br>7</span></div>
<div class="key double"><span>*<br>8</span></div>
<div class="key double"><span>(<br>9</span></div>
<div class="key double"><span>)<br>0</span></div>
<div class="key double"><span>_<br>-</span></div>
<div class="key double"><span>+<br>=</span></div>
<div class="key extra-size lowercase lower-right"><span class="lower-row-text">delete</span></div>
</div>
<div class="keyboard-row">
<div class="key extra-size lowercase lower-left"><span class="lower-row-text">tab</span></div>
<div class="key">Q</div>
<div class="key">W</div>
<div class="key">E</div>
<div class="key">R</div>
<div class="key">T</div>
<div class="key">Y</div>
<div class="key">U</div>
<div class="key">I</div>
<div class="key">O</div>
<div class="key">P</div>
<div class="key double"><span>{<br>[</span></div>
<div class="key double"><span>}<br>]</span></div>
<div class="key double"><span>|<br>\</span></div>
</div>
<div class="keyboard-row">
<div class="key extra-size-two lowercase lower-left">
<span class="lower-row-text">caps lock</span>
<span class="absolute-left caps-dot">•</span>
</div>
<div class="key">A</div>
<div class="key">S</div>
<div class="key">D</div>
<div class="key">F</div>
<div class="key">G</div>
<div class="key">H</div>
<div class="key">J</div>
<div class="key">K</div>
<div class="key">L</div>
<div class="key double"><span>:<br>;</span></div>
<div class="key double"><span>"<br>'</span></div>
<div class="key extra-size-two lowercase lower-right"><span class="lower-row-text">return</span></div>
</div>
<div class="keyboard-row">
<div class="key double-size lowercase lower-left"><span class="lower-row-text">shift</span></div>
<div class="key">Z</div>
<div class="key">X</div>
<div class="key">C</div>
<div class="key">V</div>
<div class="key">B</div>
<div class="key">N</div>
<div class="key">M</div>
<div class="key double"><span><<br>,</span></div>
<div class="key double"><span>><br>.</span></div>
<div class="key double"><span>?<br>/</span></div>
<div class="key double-size lowercase lower-right"><span class="lower-row-text">shift</span></div>
</div>
<div class="keyboard-row bottom-row">
<div class="key lowercase"><span class="lower-row-text">fn</span></div>
<div class="key lowercase"><span class="lower-row-text">control</span></div>
<div class="key lowercase"><span class="lower-row-text">option</span></div>
<div class="key lowercase extra-size-two lower-center">
<span class="lower-row-text">command</span>
<span class="absolute-right icon">⌘</span>
</div>
<div class="key space-bar"></div>
<div class="key lowercase extra-size-two lower-center">
<span class="lower-row-text">command</span>
<span class="absolute-left icon">⌘</span>
</div>
<div class="key lowercase"><span class="lower-row-text">option</span></div>
<div class="arrows">
<div class="key left-arrow">◄</div>
<div class="up-down">
<div class="key">▲</div>
<div class="key">▼</div>
</div>
<div class="key">►</div>
</div>
</div>
</div>
</body>
</html>
Below is the css code for this video.
style.css
* {
margin: 0;
padding: 0;
}
body {
height: 100vh;
width: 100%;
background-image: linear-gradient(to right, #dad2f38c, #dad2f31a, #fba8a41a, #fba8a48c), url(https://images.unsplash.com/photo-1598985348522-aab254d10928?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1471&q=80);
background-position: center;
background-repeat: no-repeat;
background-size: cover;
font-family: sans-serif;
overflow: hidden;
}
.keyboard {
position: relative;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 82%;
background-color: #ffffff1a;
backdrop-filter: blur(10px);
box-shadow: 0 0 20px #000000, inset 0 0 10px #00000080;
border-radius: 8px;
padding: 15px;
}
.keyboard-row {
display: flex;
}
.key {
position: relative;
display: inline-block;
flex: 1;
height: 40px;
background-color: #ffffff0d;
color: #ffffff;
backdrop-filter: blur(10px);
border: 1px solid #ffffff0d;
border-radius: 4px;
text-align: center;
text-transform: uppercase;
font-size: 16px;
line-height: 1.25;
vertical-align: middle;
white-space: nowrap;
box-shadow: inset 0 0 5.5px #00000040;
margin: 4px;
padding: 3px 2px;
overflow: hidden;
cursor: pointer;
transition: all 0.5s ease;
}
.key::before {
content: "";
display: inline-block;
height: 100%;
vertical-align: middle;
}
.key span {
display: inline-block;
vertical-align: middle;
}
.key:hover {
border: none;
box-shadow: none;
background-color: #ffffff40;
}
.key.power {
flex: 0.5;
}
.keyboard-row.thin .key {
height: 25px;
}
.key.extra-size {
flex: 1.25;
}
.key.extra-size-two {
flex: 1.625;
}
.key.double-size {
flex: 2.125;
}
.key.lowercase {
font-size: 12px;
text-transform: lowercase;
}
.key.function {
font-size: 10px;
}
.key.lower-right {
text-align: right;
vertical-align: bottom;
padding-right: 5px;
}
.key.lower-left {
text-align: left;
vertical-align: bottom;
padding-left: 5px;
}
.key.lower-center {
vertical-align: bottom;
}
.key.space-bar {
flex: 7.2;
}
.key .lower-row-text {
vertical-align: bottom;
padding-bottom: 2px;
}
.key .absolute-left, .key .absolute-right {
position: absolute;
top: 5px;
font-size: 10px;
}
.key .absolute-left.icon, .key .absolute-right.icon {
font-size: 14px;
}
.key .absolute-right {
right: 5px;
}
.key .absolute-left {
left: 5px;
}
.key .absolute-left.caps-dot {
top: 3px;
left: 4px;
}
.bottom-row .arrows {
display: flex;
flex: 4;
justify-content: center;
align-items: flex-end;
padding-bottom: 4px;
}
.bottom-row .arrows .up-down {
flex: 1.2;
display: flex;
flex-direction: column;
margin-left: 4px;
margin-right: 4px;
}
.bottom-row .arrows .up-down .key {
display: flex;
align-items: center;
justify-content: center;
min-height: 20px;
margin: 0;
}
.bottom-row .arrows .up-down .key:first-child {
margin-bottom: 1px;
border-bottom-left-radius: 1px;
border-bottom-right-radius: 1px;
}
.bottom-row .arrows .up-down .key+.key {
border-top-left-radius: 1px;
border-top-right-radius: 1px;
}
.bottom-row .arrows .key {
height: 20px;
flex: 1;
font-size: 8px;
margin: 0 4px;
}
.double {
line-height: 1;
}
.key.left-arrow {
font-size: 12px !important;
}
Thanks for visiting