修改palceholder內文字的css樣式
1 ::-webkit-input-placeholder{
2 color: red;
3 font-size: 20px;
4 line-height: 50px;
5 }
修改class名為test1的元素palceholder內文字css樣式
.test1::-webkit-input-placeholder{
color: red;
font-size: 20px;
line-height: 50px;
}
比如:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
input{
height: 50px;
font-size: 14px;
</style>
</head>
<body>
<input type="text" placeholder="測試" />
</body>
</html>
修改palceholder內文字的css樣式
1 ::-webkit-input-placeholder{
2 color: red;
3 font-size: 20px;
4 line-height: 50px;
5 }
修改class名為test1的元素palceholder內文字css樣式
.test1::-webkit-input-placeholder{
color: red;
font-size: 20px;
line-height: 50px;
}
比如:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
input{
height: 50px;
font-size: 14px;
line-height: 50px;
}
.test1::-webkit-input-placeholder{
color: red;
font-size: 20px;
line-height: 50px;
}
</style>
</head>
<body>
<input type="text" placeholder="測試" />
<input type="text" placeholder="測試" />
</body>
</html>