Created
September 9, 2014 12:39
-
-
Save yuzuemon/42a5520504dcb5c364e9 to your computer and use it in GitHub Desktop.
textareaでのplaceholder改行したい->ダメでした
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang='ja'> | |
<body> | |
<!-- ChromeだけOK --> | |
<textarea id='' name='' cols='30' rows='10' placeholder='ああ
あああ'></textarea> | |
<!-- ダメ --> | |
<textarea id='' name='' cols='30' rows='10' placeholder="あああ<br>あああ"></textarea> | |
<!-- ChromeだけOK --> | |
<textarea id='' name='' cols='30' rows='10' placeholder='ああ | |
あああ'></textarea> | |
</body> | |
</html> | |
<!-- | |
http://www.w3.org/TR/html5/forms.html#attr-textarea-placeholder には User agents should present this hint to the user when the element's value is the empty string and the control is not focused (e.g. by displaying it inside a blank unfocused control). All U+000D CARRIAGE RETURN U+000A LINE FEED character pairs (CRLF) in the hint, as well as all other "CR" (U+000D) and "LF" (U+000A) characters in the hint, must be treated as line breaks when rendering the hint. | |
http://www.w3.org/TR/html-markup/textarea.html には placeholder = string without line breaks | |
と書いてある.. | |
--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment