placeholderの文字色を変更したくて調べた時に書いたコードです
::-webkit-input-placeholder {
color: pink;
}
<style></style>内に上記の設定を書くと指定した色に変更できるようです(Chrome)
HTML Serviceで実際に試してみた例が以下のコードです
コード.gs
function doGet(){
return HtmlService.createHtmlOutputFromFile('index');
}
|
意訳この処理は以下を実行する 指定したHTMLファイルを表示する |
index.html
<!DOCTYPE html>
<html>
<head>
<style>
::-webkit-input-placeholder {
color: pink;
}
</style>
</head>
<body>
<input type="text" placeholder="テキスト入力">
</body>
</html>
|
意訳HTMLの宣言 ここからhtml ここからhead ここからstyle placeholderの 文字色をpinkにする ここまでstyle ここまでhead ここまでbosy テキストボックスを配置する ここまでbody ここまでhtml |
