Devextreme 为组件更改颜色或应用样式
Devextreme change color or apply style for components
如何更改 DevExtreme TextBox 的颜色?
实际上,我如何为它们应用 css 样式,因为我还需要对组件应用 text-transform
!
演示
http://js.devexpress.com/Demos/WidgetsGallery/#demo/editors-text_box-overview
更新
我需要将 css 属性 应用到 特定组件 ,我正在使用 AngularJS!
我试过没有成功
<div style="background-color : black" dx-text-box="textBox.simple"></div>
如果它提供 AngularJS 代码中的 属性 以将 css 应用到组件,那就太好了!
Actually, how can I apply the css style for them, because also I need do apply text-transform to the component!
嗨!这是示例:
.dx-textbox .dx-texteditor-input{
text-transform: uppercase;
}
How can I change the color of DevExtreme TextBox?
要自定义样式,您可以使用 Theme Builder
更新
这个问题有一些解答
解决方案 1:
你可以设置 attr property:
$scope.textBox = {
simple: {
value: "John Smith",
attr: { style: "background-color: black" }
}
}
解决方案 2:
可以通过id或者class:
来设置
html:
<div id="specificTextbox" dx-text-box="textBox.simple"></div>
css:
#specificTextbox .dx-texteditor-input{
background-color : black;
}
如何更改 DevExtreme TextBox 的颜色?
实际上,我如何为它们应用 css 样式,因为我还需要对组件应用 text-transform
!
演示
http://js.devexpress.com/Demos/WidgetsGallery/#demo/editors-text_box-overview
更新
我需要将 css 属性 应用到 特定组件 ,我正在使用 AngularJS!
我试过没有成功
<div style="background-color : black" dx-text-box="textBox.simple"></div>
如果它提供 AngularJS 代码中的 属性 以将 css 应用到组件,那就太好了!
Actually, how can I apply the css style for them, because also I need do apply text-transform to the component!
嗨!这是示例:
.dx-textbox .dx-texteditor-input{
text-transform: uppercase;
}
How can I change the color of DevExtreme TextBox?
要自定义样式,您可以使用 Theme Builder
更新
这个问题有一些解答
解决方案 1: 你可以设置 attr property:
$scope.textBox = {
simple: {
value: "John Smith",
attr: { style: "background-color: black" }
}
}
解决方案 2: 可以通过id或者class:
来设置html:
<div id="specificTextbox" dx-text-box="textBox.simple"></div>
css:
#specificTextbox .dx-texteditor-input{
background-color : black;
}