【问题标题】:How do I add the arrow image in the accordian below BEFORE the header and not as header's background?如何在标题之前的手风琴中添加箭头图像,而不是作为标题背景?
【发布时间】:2011-05-27 12:11:51
【问题描述】:

在下面的手风琴中:-

当我想要在标题文本之前显示箭头折叠图像时,它会出现在标题文本的背景中。 Also, when the Header of accordian is seleceted, the arrow-collapsed image is not changing to arrow- expanded..whats wrong??????

  <cc1:Accordion ID="Accordion1" runat="server" FadeTransitions="true" Visible="true" AutoSize="None" SelectedIndex="0" RequireOpenedPane="false" TransitionDuration="250" 
         HeaderCssClass="accordionHeader toggler" 
         HeaderSelectedCssClass="accordionHeader toggler-expanded" 
         ContentCssClass="accordionContent"> 
            <HeaderTemplate> 

                <b style="color: Black">    
                    <%#Eval("Ques")%> 
                </b> 

            </HeaderTemplate>        

            <ContentTemplate> 
                <p> <%#DataBinder.Eval(Container.DataItem, "QuesAns")%></p>        
            </ContentTemplate> 
     </cc1:Accordion> 

【问题讨论】:

    标签: c# asp.net html css ajax


    【解决方案1】:

    您需要在标题中添加一些填充以将文本从背景图像中移开。我不知道您使用的图像尺寸,但请尝试:

    .accordionHeader {
    cursor: pointer;
    margin-top: 10px;
    margin-left: 20px;
    padding-left:20px;
    }
    

    当然,您可能想删除 margin-left - 我不确定这是否用于背景图像..

    当您展开手风琴时 - html 中的类名是否发生变化?

    【讨论】:

    • 我修复了图像的东西..thnx
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-06-13
    • 2011-05-26
    • 1970-01-01
    • 1970-01-01
    • 2015-02-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多