Modify the style of the input attribute placeholder

<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="Mu Renzi Wei Yichen">
  <title>Modify the style of the input attribute placeholder</title>
  <style>
       #canChange::-webkit-input-placeholder{
	      color:red;
		  font-size:2em;
	   }
  </style>
 </head>
 <body>
              <input type="text" placeholder="I can change">
			  <input type="text" placeholder="I can change" id="canChange">
 </body>
</html>

Whether the browser supports it, adding a prefix is, for example, webkit is a browser with webkit kernel, ms is a browser with ms kernel

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325061887&siteId=291194637