修改placeholder样式
1 /* 修改placeholder样式,兼容性 新版火狐,IE10+ */ 2 .login-input::-webkit-input-placeholder { 3 color: #000; 4 font-size: 0.3rem; 5 transition: .5s; 6 transform-origin: left top; 7 } 8 .login-input::-moz-placeholder { 9 color: #000; 10 font-size: 0.3rem; 11 transition: .5s; 12 transform-origin: left top; 13 } 14 .login-input:-ms-input-placeholder { 15 color: #000; 16 font-size: 0.3rem; 17 transition: .5s; 18 transform-origin: left top; 19 } 20 /* 兼容性 新版火狐,IE10+ */ 21 .login-input:focus::-webkit-input-placeholder { 22 color: #aaa; 23 transform: scale(0.7) translateY(-0.28rem); 24 } 25 .login-input:focus::-moz-placeholder { 26 color: #aaa; 27 transform: scale(0.7) translateY(-0.28rem); 28 } 29 .login-input:focus:-ms-input-placeholder { 30 color: #aaa; 31 transform: scale(0.7) translateY(-0.28rem); 32 }
本文来自博客园,作者:叶子玉,转载请注明原文链接:https://www.cnblogs.com/knuzy/p/9933253.html