.TreeView
{
border-bottom:1px dotted #B2B2B2 !important;
}
.TreeView div
{
margin-left:5px;
}
.TreeView table
{
border-top:1px dotted #B2B2B2 !important;
}
.TreeView div table
{
border-bottom:none !important;
border-top:none !important;
}
.TreeView table td
{
padding:2px 0;
}
.LeafNodesStyle
{
}
.RootNodeStyle
{
}
/* ALL ELEMENTS */
.NodeStyle
{
}
.ParentNodeStyle
{
background:yellow;
}
a.SelectedNodeStyle
{
background:#E5E5E5;
display:block;
padding:2px 0 2px 3px;
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
treeview 控件的代码
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<div id="content-side1-three-column">
<h2>
<a href="/Items.aspx">All Items</a></h2>
<asp:TreeView ID="TreeViewCategories" runat="server" ShowLines="True" ExpandDepth="0"
LineImagesFolder="~/TreeLineImages" NodeIndent="0" LeafNodeStyle-CssClass="LeafNodesStyle"
CssClass="TreeView" NodeStyle-CssClass="NodeStyle" ParentNodeStyle-CssClass="ParentNodeStyle"
RootNodeStyle-CssClass="RootNodeStyle" SelectedNodeStyle-CssClass="SelectedNodeStyle"
LeafNodeStyle-Width="100%" NodeStyle-Width="100%" ParentNodeStyle-Width="100%"
RootNodeStyle-Width="100%" SelectedNodeStyle-Width="100%">
<Nodes>
<asp:TreeNode Text="All Items" SelectAction="Expand" PopulateOnDemand="True" ="All Items" />
</Nodes>
<%--<HoverNodeStyle ForeColor="RoyalBlue" />--%>
<SelectedNodeStyle BackColor="Transparent" CssClass="SelectedNodeStyle" Width="100%" />
<RootNodeStyle Font-Bold="True" Font-Size="Larger" HorizontalPadding="5px" CssClass="RootNodeStyle"
Width="100%" />
<ParentNodeStyle CssClass="ParentNodeStyle" Width="100%" />
<LeafNodeStyle CssClass="LeafNodesStyle" Width="100%" />
<NodeStyle CssClass="NodeStyle" Width="100%" />
</asp:TreeView>
</div>