jquery 在对话框中更改按钮文本颜色

jquery changing button text color in dialog

我使用 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>

测试一下:

color: #008CBA !important;

正如我在开发者工具中看到的那样。你应该使用 class:

.ui-button {
..
}

试试吧