Skip to content

Instantly share code, notes, and snippets.

Created March 14, 2014 05:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/9542420 to your computer and use it in GitHub Desktop.
Save anonymous/9542420 to your computer and use it in GitHub Desktop.
A Pen by Secret Sam.
<div>
<h3>Multiline placeholder text</h3>
<textarea placeholder="First line"></textarea>
</div>
$('textarea').on('keyup', function (e) {
if (e.keyCode === 27) {
$(this).val('');
}
});
@import "compass";
html, body {
background-color: #ecf0f1;
}
div {
width: 300px;
margin: 0 auto;
}
h3 {
width: 300px;
color: #2980b9;
}
textarea {
width: 300px;
height: 80px;
&::-webkit-input-placeholder::after {
display:block;
content:"Second line \A Third line\A You get the picture...";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment