离子 - 如何更改文本字段背景颜色?

Moh*_*din 2 css angularjs ionic-framework

我已经将textfield背景颜色设置为透明但不能在Ionic中工作.

.item .item-input {
    background-color: transparent;
}
Run Code Online (Sandbox Code Playgroud)

我已经阅读了离子文档,但它没有用.它仍然是白色.

http://ionicframework.com/docs/components/#forms-inline-labels

在此输入图像描述

请指教.谢谢.

And*_*sen 13

你确定你的css规则匹配正确的元素吗?

你的规则:

.item .item-input {
    background-color: transparent;
}
Run Code Online (Sandbox Code Playgroud)

使用类item-input匹配元素,该类是具有类项的元素的后代.也许你的意思是:?

.item.item-input {
    background-color: transparent;
}
Run Code Online (Sandbox Code Playgroud)

此规则匹配具有类项项输入的元素.