实现代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>demo实例</title>
<style>
.input1::-ms-input-placeholder {
text-align: center;
}
.input1::-webkit-input-placeholder {
text-align: center;
}
</style>
</head>
<body>
<input type="text" placeholder="请输入内容..."/>
<input type="text" class="input1" placeholder="请输入内容..."/>
<input type="text" placeholder="请输入内容..."/>
</body>
</html>