如果这是非常基本的话我是新来的css如此宽容.但我的html页面中有这样的元素
<div id="ui-datepicker-div" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all">
Run Code Online (Sandbox Code Playgroud)
在我的CSS中,我有以下内容:
.ui-widget-content {
background: yellow !important;
color: blue !important;
border-radius: 0px !important;
border: none;
}
.ui-widget-content .ui-datepicker {
background: blue; !important;
border: 1px solid #555; !important;
color: red; !important;
}
Run Code Online (Sandbox Code Playgroud)
有了这个,我希望我的ui-datepicker元素具有蓝色背景,但它总是变成黄色.无论我在哪里放置.ui-wdget-content.如果我想让css所有ui-widget-element都有黄色背景,除了ui-datepicker有蓝色背景.我必须做什么css咒语?
.ui-widget-content .ui-datepicker应该是.ui-widget-content.ui-datepicker(没有空间)
ui-datepicker内部没有类ui-widget-content,而是要选择具有两个类的元素.