【问题标题】:jquery changing button text color in dialogjquery在对话框中更改按钮文本颜色
【发布时间】:2021-06-26 11:10:24
【问题描述】:

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

【问题讨论】:

  • 可以添加html标记吗?

标签: jquery text colors dialog


【解决方案1】:

测试一下:

color: #008CBA !important;

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

.ui-button {
..
}

试试看

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-11-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-12
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多