JQuery UI 标签背景颜色
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15313615/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
JQuery UI Tabs Background Color
提问by demitchell14
I'm trying to change the background of the tab area.. like, You have a list of tabs, and I know how to change the color of each individual tab, but I was wondering if you could change the color of the background of all of that. Normally it's the dark gray color, and the tabs are the light gray. I was wanted to change those colors to maybe either a light blue, or light green, and I've tried changing the CSS of everything I could find relating to the UI Tabs, and none of them worked.
我正在尝试更改选项卡区域的背景……例如,您有一个选项卡列表,我知道如何更改每个选项卡的颜色,但我想知道您是否可以更改选项卡的背景颜色所有的。通常它是深灰色,标签是浅灰色。我想将这些颜色更改为浅蓝色或浅绿色,并且我尝试更改我能找到的所有与 UI 选项卡相关的 CSS,但它们都不起作用。
回答by Dom
You want to change .ui-tabs .ui-tabs-nav
.
你想改变.ui-tabs .ui-tabs-nav
。
CSS:
CSS:
.ui-tabs .ui-tabs-nav
{
background: lightblue;
}
.ui-tabs .ui-tabs-panel /* just in case you want to change the panel */
{
background: blue;
}
回答by Raj
You can do this by setting the background of div also . below is example -->
您也可以通过设置 div 的背景来做到这一点。下面是例子-->
<div id="tabs" style="background: none repeat scroll 0% 0% rgb(204, 204, 204);">
<ul>
<li><a href="#tabs-1">Product-Tweets</a></li>
<li><a href="#tabs-2">Popular Product</a></li>
</ul>
<div id="tabs-1"> tab 1 content </div>
<div id="tab-2"> tab 2 content </div>
</div>