css_day05_修改input中placeholder的預設屬性
阿新 • • 發佈:2018-12-25
一點一點地積累,慢慢地你會得到你想要的東西,為自己而加油吧!
修改input中placeholder的預設樣式
<html>
<head>
<meta charset="UTF-8">
<title>修改input中placeholder的預設樣式</title>
<style>
input{
width:500px;
height:40px;
}
.change ::-webkit-input-placeholder{
font-size:20px;
color:red;
}
/*Mozilla Firefox 4 to 18*/
:-moz-placeholder{
font-size:20px;
color:red;
}
/*Mozilla Firefox 19+*/
::-moz-placeholder {
font-size:20px;
color:red;
}
:-ms-input-placeholder{
font-size:20px;
color:red;
}
/*注意:和::的區別*/
</style>
</head>
<body>
<input class="change" type="text" placeholder="修改placeholder的預設樣式">
</body>
</html>