aboutsummaryrefslogtreecommitdiff
path: root/docs/4.6/examples/floating-labels
diff options
context:
space:
mode:
authorXhmikosR <[email protected]>2021-01-19 08:34:18 +0200
committerXhmikosR <[email protected]>2021-01-19 18:20:37 +0200
commit0bb8f991a032ff984f45ede26b53643ffa93891b (patch)
treeb5c124360151f417b9a4c15f2a5a6f9e4389095c /docs/4.6/examples/floating-labels
parentb298dc0b34fd1ca73e8aa83e57fac4151bfbc3db (diff)
downloadbootstrap-0bb8f991a032ff984f45ede26b53643ffa93891b.tar.xz
bootstrap-0bb8f991a032ff984f45ede26b53643ffa93891b.zip
Add v4.6.0 docs
Diffstat (limited to 'docs/4.6/examples/floating-labels')
-rw-r--r--docs/4.6/examples/floating-labels/floating-labels.css130
-rw-r--r--docs/4.6/examples/floating-labels/index.html83
2 files changed, 213 insertions, 0 deletions
diff --git a/docs/4.6/examples/floating-labels/floating-labels.css b/docs/4.6/examples/floating-labels/floating-labels.css
new file mode 100644
index 000000000..e08144d81
--- /dev/null
+++ b/docs/4.6/examples/floating-labels/floating-labels.css
@@ -0,0 +1,130 @@
+html,
+body {
+ height: 100%;
+}
+
+body {
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-align: center;
+ align-items: center;
+ padding-top: 40px;
+ padding-bottom: 40px;
+ background-color: #f5f5f5;
+}
+
+.form-signin {
+ width: 100%;
+ max-width: 420px;
+ padding: 15px;
+ margin: auto;
+}
+
+.form-label-group {
+ position: relative;
+ margin-bottom: 1rem;
+}
+
+.form-label-group input,
+.form-label-group label {
+ height: 3.125rem;
+ padding: .75rem;
+}
+
+.form-label-group label {
+ position: absolute;
+ top: 0;
+ left: 0;
+ display: block;
+ width: 100%;
+ margin-bottom: 0; /* Override default `<label>` margin */
+ line-height: 1.5;
+ color: #495057;
+ pointer-events: none;
+ cursor: text; /* Match the input under the label */
+ border: 1px solid transparent;
+ border-radius: .25rem;
+ transition: all .1s ease-in-out;
+}
+
+.form-label-group input::-webkit-input-placeholder {
+ color: transparent;
+}
+
+.form-label-group input::-moz-placeholder {
+ color: transparent;
+}
+
+.form-label-group input:-ms-input-placeholder {
+ color: transparent;
+}
+
+.form-label-group input::-ms-input-placeholder {
+ color: transparent;
+}
+
+.form-label-group input::placeholder {
+ color: transparent;
+}
+
+.form-label-group input:not(:-moz-placeholder-shown) {
+ padding-top: 1.25rem;
+ padding-bottom: .25rem;
+}
+
+.form-label-group input:not(:-ms-input-placeholder) {
+ padding-top: 1.25rem;
+ padding-bottom: .25rem;
+}
+
+.form-label-group input:not(:placeholder-shown) {
+ padding-top: 1.25rem;
+ padding-bottom: .25rem;
+}
+
+.form-label-group input:not(:-moz-placeholder-shown) ~ label {
+ padding-top: .25rem;
+ padding-bottom: .25rem;
+ font-size: 12px;
+ color: #777;
+}
+
+.form-label-group input:not(:-ms-input-placeholder) ~ label {
+ padding-top: .25rem;
+ padding-bottom: .25rem;
+ font-size: 12px;
+ color: #777;
+}
+
+.form-label-group input:not(:placeholder-shown) ~ label {
+ padding-top: .25rem;
+ padding-bottom: .25rem;
+ font-size: 12px;
+ color: #777;
+}
+
+.form-label-group input:-webkit-autofill ~ label {
+ padding-top: .25rem;
+ padding-bottom: .25rem;
+ font-size: 12px;
+ color: #777;
+}
+
+/* Fallback for Edge
+-------------------------------------------------- */
+@supports (-ms-ime-align: auto) {
+ .form-label-group {
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-direction: column-reverse;
+ flex-direction: column-reverse;
+ }
+
+ .form-label-group label {
+ position: static;
+ }
+
+ .form-label-group input::-ms-input-placeholder {
+ color: #777;
+ }
+}
diff --git a/docs/4.6/examples/floating-labels/index.html b/docs/4.6/examples/floating-labels/index.html
new file mode 100644
index 000000000..d08f0a342
--- /dev/null
+++ b/docs/4.6/examples/floating-labels/index.html
@@ -0,0 +1,83 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+ <meta name="description" content="">
+ <meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
+ <meta name="generator" content="Hugo 0.80.0">
+ <title>Floating labels example ยท Bootstrap v4.6</title>
+
+ <link rel="canonical" href="https://getbootstrap.com/docs/4.6/examples/floating-labels/">
+
+
+
+ <!-- Bootstrap core CSS -->
+<link href="/docs/4.6/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
+
+
+
+ <!-- Favicons -->
+<link rel="apple-touch-icon" href="/docs/4.6/assets/img/favicons/apple-touch-icon.png" sizes="180x180">
+<link rel="icon" href="/docs/4.6/assets/img/favicons/favicon-32x32.png" sizes="32x32" type="image/png">
+<link rel="icon" href="/docs/4.6/assets/img/favicons/favicon-16x16.png" sizes="16x16" type="image/png">
+<link rel="manifest" href="/docs/4.6/assets/img/favicons/manifest.json">
+<link rel="mask-icon" href="/docs/4.6/assets/img/favicons/safari-pinned-tab.svg" color="#563d7c">
+<link rel="icon" href="/docs/4.6/assets/img/favicons/favicon.ico">
+<meta name="msapplication-config" content="/docs/4.6/assets/img/favicons/browserconfig.xml">
+<meta name="theme-color" content="#563d7c">
+
+
+ <style>
+ .bd-placeholder-img {
+ font-size: 1.125rem;
+ text-anchor: middle;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ }
+
+ @media (min-width: 768px) {
+ .bd-placeholder-img-lg {
+ font-size: 3.5rem;
+ }
+ }
+ </style>
+
+
+ <!-- Custom styles for this template -->
+ <link href="floating-labels.css" rel="stylesheet">
+ </head>
+ <body>
+
+<form class="form-signin">
+ <div class="text-center mb-4">
+ <img class="mb-4" src="/docs/4.6/assets/brand/bootstrap-solid.svg" alt="" width="72" height="72">
+ <h1 class="h3 mb-3 font-weight-normal">Floating labels</h1>
+ <p>Build form controls with floating labels via the <code>:placeholder-shown</code> pseudo-element. <a href="https://caniuse.com/css-placeholder-shown">Works in latest Chrome, Safari, Firefox, and IE 10/11 (prefixed).</a></p>
+ </div>
+
+ <div class="form-label-group">
+ <input type="email" id="inputEmail" class="form-control" placeholder="Email address" required autofocus>
+ <label for="inputEmail">Email address</label>
+ </div>
+
+ <div class="form-label-group">
+ <input type="password" id="inputPassword" class="form-control" placeholder="Password" required>
+ <label for="inputPassword">Password</label>
+ </div>
+
+ <div class="checkbox mb-3">
+ <label>
+ <input type="checkbox" value="remember-me"> Remember me
+ </label>
+ </div>
+ <button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
+ <p class="mt-5 mb-3 text-muted text-center">&copy; 2017-2021</p>
+</form>
+
+
+
+ </body>
+</html>