Dijit ConfirmDialog - 更改其默认样式
Dijit ConfirmDialog - change its default style
如何更改dijit ConfirmDialog的默认样式(栏颜色、内容颜色等)?请参阅下面的代码。确认对话框的宽度和颜色都没有改变。
var confirm = new ConfirmDialog({
title: "Confirmation",
content: "This is the content",
style: "width: 400px, color: grey"
}).show();
我相信您只需要将 ,
更改为 semi-colon ;
var confirm = new ConfirmDialog({
title: "Confirmation",
content: "This is the content",
style: "width: 400px; color: grey"
}).show();
顺便说一句,style
中的color
属性只是内容颜色。要更改标题栏背景颜色,link 表示:
You'd have to override the background-color on the .dijitDialogTitleBar css. For example,
<link rel="stylesheet" type="text/css" href="dojo-release-1.6.1-src/dojo/resources/dojo.css" />
<link rel="stylesheet" type="text/css" href="dojo-release-1.6.1-src/dijit/themes/claro/claro.css" />
<style> .claro .dijitDialogTitleBar { background-color: #00FF00 } </style>
这里,颜色改为绿色。
如何更改dijit ConfirmDialog的默认样式(栏颜色、内容颜色等)?请参阅下面的代码。确认对话框的宽度和颜色都没有改变。
var confirm = new ConfirmDialog({
title: "Confirmation",
content: "This is the content",
style: "width: 400px, color: grey"
}).show();
我相信您只需要将 ,
更改为 semi-colon ;
var confirm = new ConfirmDialog({
title: "Confirmation",
content: "This is the content",
style: "width: 400px; color: grey"
}).show();
顺便说一句,style
中的color
属性只是内容颜色。要更改标题栏背景颜色,link 表示:
You'd have to override the background-color on the .dijitDialogTitleBar css. For example,
<link rel="stylesheet" type="text/css" href="dojo-release-1.6.1-src/dojo/resources/dojo.css" />
<link rel="stylesheet" type="text/css" href="dojo-release-1.6.1-src/dijit/themes/claro/claro.css" />
<style> .claro .dijitDialogTitleBar { background-color: #00FF00 } </style>
这里,颜色改为绿色。