使用JQuery将Treeview节点与CSS对齐 [英] Treeview nodes alignment with CSS using JQuery
本文介绍了使用JQuery将Treeview节点与CSS对齐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的所有人,
我在网页中使用以下CSS作为Treeview:
Dear All,
I am using the following CSS for a treeview in my webpage:
.treeview, .treeview ul {
padding: 0 0 0 10px;
margin: 0;
list-style: none;
width: 10%;
}
.treeview ul {
background-color: transparent;
margin-top: 4px;
}
.treeview .hitarea {
background: url(images/treeview-default.gif) -64px -25px no-repeat;
height: 16px;
width: 16px;
margin-left: -16px;
float: left;
cursor: pointer;
padding-left: 0;
}
/* fix for IE6 */
* html .hitarea {
display: inline;
float:none;
}
.treeview li {
margin: 0;
padding: 3px 0pt 3px 16px;
}
.treeview LI:hover
{
text-decoration:none;
}
.treeview LI:hover UL LI
{
text-decoration:none;
}
.treeview a.selected {
color: Maroon;
}
#treecontrol { margin: 1em 0; display: none; }
.treeview .hover { color: red; cursor: pointer; }
.treeview li { background: url(images/treeview-default-line.gif) 0 0 no-repeat; }
.treeview li.collapsable, .treeview li.expandable { background-position: 0 -176px; }
.treeview .expandable-hitarea { background-position: -80px -3px; }
.treeview li.last { background-position: 0 -1766px }
.treeview li.lastCollapsable, .treeview li.lastExpandable { background-image: url(images/treeview-default.gif); }
.treeview li.lastCollapsable { background-position: 0 -111px }
.treeview li.lastExpandable { background-position: -32px -67px }
.treeview div.lastCollapsable-hitarea, .treeview div.lastExpandable-hitarea { background-position: 0; }
在这里,我想将所有节点的颜色更改为白色",默认情况下现在为蓝色.
有人可以建议我吗?
谢谢&问候,
Here, I want to change the color of all the nodes to "white" which is now blue by default.
Can any one please suggest me regarding this?
Thanks & Regards,
推荐答案
您是否正在使用ASP.NET Treeview?您没有在问题中包括HTML控件.如果是ASP.NET Treeview,则请参见此
Are you using ASP.NET Treeview? You didn''t include the HTML control things in your question. If ASP.NET Treeview then see this
.clsWhite { color: White; }
<asp:treeview runat="server" xmlns:asp="#unknown">
<nodestyle cssclass="clsWhite" /><!--This one is enough, the below elements are optional(If you want to show different style then apply different classes there)-->
<rootnodestyle cssclass="clsWhite" />
<parentnodestyle cssclass="clsWhite" />
<leafnodestyle cssclass="clsWhite" />
<hovernodestyle cssclass="clsWhite" />
<selectednodestyle cssclass="clsWhite" />
</asp:treeview>
这篇关于使用JQuery将Treeview节点与CSS对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文