css輸入框placeholder樣式修改以及背景顏色漸變設定
阿新 • • 發佈:2018-12-25
程式碼如下
/* placeholder 樣式設定 */ input::-webkit-input-placeholder,textarea::-webkit-input-placeholder { font-size: 0.16rem; color: #999; font-style: "PingFang-SC-Bold"; } input:-moz-placeholder,textarea:-moz-placeholder { font-size: 0.16rem; color: #999; font-style: "PingFang-SC-Bold"; } input::-moz-placeholder,textarea::-moz-placeholder { font-size: 0.16rem; color: #999; font-style: "PingFang-SC-Bold"; } input:-ms-input-placeholder,textarea:-ms-input-placeholder { font-size: 0.16rem; color: #999; font-style: "PingFang-SC-Bold"; } /* 背景顏色漸變設定,從右向左 */ background: -webkit-linear-gradient(right, #e8bb72 , #f5d399); /* Safari 5.1 - 6.0 */ background: -o-linear-gradient(left, #e8bb72, #f5d399); /* Opera 11.1 - 12.0 */ background: -moz-linear-gradient(left, #e8bb72, #f5d399); /* Firefox 3.6 - 15 */ background: linear-gradient(to left, #e8bb72 , #f5d399); /* 標準的語法 */