Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/88.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jQueryUI小部件覆盖自定义CSS_Jquery_Html_Css_Jquery Ui_Jquery Ui Dialog - Fatal编程技术网

jQueryUI小部件覆盖自定义CSS

jQueryUI小部件覆盖自定义CSS,jquery,html,css,jquery-ui,jquery-ui-dialog,Jquery,Html,Css,Jquery Ui,Jquery Ui Dialog,我试图使jQueryUI提供的widget overlay()变暗,但没有成功。我已经将jQuery使用的CSS缩小到类ui.widget overlay,但似乎无法在我自己的样式表中覆盖jQuery CSS 我尝试了$('.ui widget overlay').addClass('override'),但没有加载我自己的样式(我已经使用Chrome的开发工具确认了这一点)。类似地,$('.ui widget overlay').removeClass('ui widget overlay')

我试图使jQueryUI提供的widget overlay()变暗,但没有成功。我已经将jQuery使用的CSS缩小到类
ui.widget overlay
,但似乎无法在我自己的样式表中覆盖jQuery CSS

我尝试了
$('.ui widget overlay').addClass('override')
,但没有加载我自己的样式(我已经使用Chrome的开发工具确认了这一点)。类似地,
$('.ui widget overlay').removeClass('ui widget overlay')addClass('override')
也没有效果

我也尝试过使用
!我的样式表中的重要标记,同样无效

我的小提琴是。jQueryUI标准CSS如下所示:

.ui小部件覆盖{background:#aaaaaa url(images/ui-bg_flat_0_uuaaaa _40x100.png)50%50%repeat-x;不透明度:.3;过滤器:Alpha(不透明度=30);}

我想用这个来代替它:

.ui小部件覆盖{background:#22222 50%50%repeat-x;不透明度:.3;过滤器:Alpha(不透明度=30);}

HTML

<a href="#" id="advisers-image">
    <div class="circle hovershadow advisers advisers-box-shadow text">Professional
        advisers</div>
</a>

<a href="#" id="industry-image">
    <div class="circle hovershadow industry industry-box-shadow">Industry</div>
</a>

<div style="clear: both;"></div>

<div id="advisers-dialog" class="dialog">

    <div id="tabs">
        <ul>
            <li><a href="#tabs-1">Law firms</a></li>
            <li><a href="#tabs-2">Accounting and audit firms</a></li>
            <li><a href="#tabs-3">Management consultants and economists</a></li>
        </ul>
        <div id="tabs-1">
            <p>Law firm text here.</p>
            <div id="tabs-inner-link"><p>Click <a href="#">here</a> to see how we can give you the edge.</p></div>
        </div>
        <div id="tabs-2">
            <p>Accounting and audit firm text goes here.</p>
        </div>
        <div id="tabs-3">
            <p>Management consultants and economists text goes here.</p>
        </div>
    </div>
</div>

<div id="industry-dialog" class="dialog" title="Industry">Industry
    text goes here</div>
CSS

.addClass('override')
添加到
打开事件中的对话框选项中:

var commonDialogOptions = {
    autoOpen: false,
    height: "auto",
    modal: true,
    width: 700,
    open: function (event, ui) {
        $('.ui-widget-header').addClass('override');
        $('.ui-widget-header a').addClass('override');
        $('.ui-widget-overlay').addClass('override');
    }
};
小提琴:


我必须离开这所房子,但很快我就能看到你在这里的对话被分成了三个主要部分;如果正确地实现了该对话框,则必须为所有三个div设置背景。但是,我认为您没有正确地实现该对话框。再次查看他们的文档。谢谢你,约翰。对话框和覆盖呈现良好,但我将查看您介绍给我的文档,谢谢您的时间。
.circle {
width: 220px;
height: 220px;
border-radius: 50%;
border: 2px solid #fff;
float: left;
display: inline-block;

/* text styling for circles - see also the .text style below */
font-size: 35px;
color: #FFF;
line-height: 220px;
text-align: center;
font-family: Ubuntu, sans-serif;
}

.dialog {
font-family: 'Istok Web', sans-serif;
font-size: 14px;
line-height: 1.8em;
}

#tabs {
font-family: 'Istok Web', sans-serif;
font-size: 14px;
line-height: 1.8em; 
}

#tabs a:link { font-weight: bold; text-decoration: none; color: #5E2750; }
#tabs a:visited { font-weight: bold; text-decoration: none; color: #5E2750; }
#tabs-inner-link a:hover { text-decoration:underline; }

.advisers {
background: #5E2750;
margin-left: 28%;
margin-right: 13%;
}

.advisers-box-shadow {
box-shadow: 0px 0px 1px 1px #5E2750
}

.industry {
background: #DD4814;
}

.industry-box-shadow {
box-shadow: 0px 0px 1px 1px #DD4814
}

.hovershadow:hover { box-shadow: 0px 0px 4px 4px #AEA79F }

.text { /* used by professional advisers circle */
line-height: 40px;
padding-top: 70px;
height: 150px
}

/* Styles below are overriden styles found in jquery-ui.css */
.ui-widget-header.override { border: 1px solid #ffffff; background: #ffffff; color: #DD4814; font-weight: bold; }
.ui-widget-header.override a { color: #DD4814; }
.ui-widget-overlay.override { background: repeat-x scroll 50% 50% #222222; opacity:0.3; filter:Alpha(Opacity=15); }
var commonDialogOptions = {
    autoOpen: false,
    height: "auto",
    modal: true,
    width: 700,
    open: function (event, ui) {
        $('.ui-widget-header').addClass('override');
        $('.ui-widget-header a').addClass('override');
        $('.ui-widget-overlay').addClass('override');
    }
};