如何覆盖按钮JQuery的默认样式 [英] How to override default style for button JQuery

查看:171
本文介绍了如何覆盖按钮JQuery的默认样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我在我的页面上建立一个按钮,像

Hi I am building a button on my page like that

<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script>
        $( "#insert-image-button" )
            .button()
            .click(function() {
                $( "#AttachImage" ).dialog( "open" );
            });
</script>


<button id="insert-image-button">Create new user</button>

按钮使用标准的JQuery样式显示。如何为该按钮提供自己的样式。

The button is diplayed using standard JQuery style. How can I provide my own style for that button. What is the best way?

这个firebug说

class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" 


推荐答案

您可以使用jQuery UI应用不同的主题: http://jqueryui.com/themeroller/

You can apply different themes with jQuery UI: http://jqueryui.com/themeroller/.

这篇关于如何覆盖按钮JQuery的默认样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆