http://codepen.io/leongaban/pen/IFvEx
我有一个基本的输入,里面有一个背景图像。但是,一旦添加了背景图像,我就失去了输入的白色背景颜色。
body {
background: #333;
}
input {
padding: 0 40px;
width: 80%;
height: 50px;
font-family: Arial;
font-size: 24px;
border: 0px;
color: #fff;
background: white;
}
#login-email{
border-bottom: 1px solid #f7f7f7;
background: url('http://leongaban.com/_codepen/ico_email_input.png') no-repeat left center;
//background: white;
}
当我取消注释该background: white;
行时,我会丢失背景图像。background-image
在这种情况下也不起作用。