Skip to content

Instantly share code, notes, and snippets.

@snap44
snap44 / floatingPH.html
Created July 30, 2018 20:21
floatingPlaceholder
<style>
.wrapper { position: relative; }
.control:focus ~ .floating-label,
.control:not(:focus):valid ~ .floating-label{
top: 6px;
left: 5px;
font-size: 11px;
opacity: 0.6;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="css/main.css">
</head>
<body>
</body>