我使用jquery在对话框中创建了一个关闭按钮,我正在尝试更改对话框中按钮的文本颜色,我可以更改按钮的颜色和文本的大小,但当我尝试更改文本的颜色时,没有任何反应。
下面是我的代码:
<script type="text/javascript">
$("#Div1").dialog({
title: "select ",
width: 320,
height: 340,
dialogClass: 'myTitleClass',
modal: true,
appendTo: "form",
buttons: {
Close: function () {
$(this).dialog('close');
}
}
});
</script>
</style>
.ui-button-text{
background:green; ------> changing the button color
font-size:50px; ------> changing the text button size
color: #008CBA; ------> doesn't change the text button color
}
</style>
发布于 2021-03-30 12:29:31
测试它:
color: #008CBA !important;
正如我在开发人员工具中看到的那样。你应该使用class:
.ui-button {
..
}
就试一下
https://stackoverflow.com/questions/66870866
复制