JavaScript preprocessors can help make authoring JavaScript easier and more convenient. For instance, CoffeeScript can help prevent easy-to-make mistakes and offer a cleaner syntax and Babel can bring ECMAScript 6 features to browsers that only support ECMAScript 5.
Any URL's added here will be added as <script>
s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
HTML Settings
Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
<form>
<h2>Оформление формы с помощью <span>псевдокласса :placeholder-shown</span></h2>
<div class="field-group">
<input type="text" placeholder="Ваше имя" id="name">
<label for="name">Ваше имя</label>
</div>
<div class="field-group">
<input type="email" placeholder="Email " id="email">
<label for="email">Email</label>
</div>
<div class="field-group">
<input type="tel" placeholder="Телефон" id="phone">
<label for="phone">Телефон</label>
</div>
</form>
*,
*:before,
*:after {
box-sizing: border-box;
font-family: 'Montserrat', sans-serif;
}
body {
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: url('https://unsplash.it/1500/1000?image=381');
background-size: cover;
}
h2 {
font-size: 18px;
}
h2 span,
a {
color: #03f;
}
form {
width: 460px;
border: 1px solid grey;
padding: 50px;
background: white;
position: relative;
}
form:after {
content: '';
display: block;
width: 104%;
height: 104%;
background-image: repeating-linear-gradient(45deg, transparent 10px, transparent 15px, #4E6D7F 15px, #4E6D7F 20px), repeating-linear-gradient(-45deg, transparent 10px, transparent 15px, #4E6D7F 15px, #4E6D7F 20px);
position: absolute;
top: -2%;
left: -2%;
z-index: -1;
box-shadow: 0 0 1px 10px rgba(0, 0, 0, 0.1);
}
.field-group {
position: relative;
}
input {
font-size: 18px;
width: 100%;
padding: 15px;
margin: 15px 0;
border: 2px solid #000;
transition: 0.5s;
}
input + label {
min-width: 105px;
text-align: center;
position: absolute;
top: 34%;
left: 70%;
transition: 0.5s;
opacity: .6;
background: white;
padding: 3px 8px;
}
input:focus {
outline: 0;
border-color: #03f;
}
input:focus + label {
border-color: #03f;
}
input:placeholder-shown + label {
opacity: 0;
transform: translate( -100%);
}
Also see: Tab Triggers