用CSS 对TREEVIEW 的外观进行改造

.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>

 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值