まずplaceholderをどうcssで設定するのかわからずこの今のtextarea ::-webkit-input-placeholderのcssの内容で上下中央になるのかも不明です。お願いします
<!DOCTYPE html> <html> <head> <title>placeholder</title> <style> .textarea{ width:750px; height:300px; margin: auto; margin:auto 0; text-align: center; border-radius:10px; font-size:30px; border:solid 2px #BDBDBD; } .textarea ::-webkit-input-placeholder{ position: absolute; top: 0; right: 0; bottom: 0; left: 0; margin: auto; } </style> </head> <body> <textarea name="comment" class="textarea" cols="45" placeholder="ここに書いてください"></textarea> </body> </html>
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。