Accordian:即使图像路径正确,箭头图像也不会显示 [英] Accordian: Arrow image not displaying even though image path is correct

查看:101
本文介绍了Accordian:即使图像路径正确,箭头图像也不会显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望在手风琴标题之前显示箭头折叠的图像,并且单击并展开手风琴标题时,箭头折叠的图像应更改为箭头展开的图像.我在下面做什么错了?同样,图像路径都是正确的.我已经检查了很多次.

I want the arrow-collapsed image to be displyed before accordian headers and when accordian header is clicked and expanded, arrow-collapsed image should change to arrow-expanded image. What am I doing wrong below? Also, image paths are all correct. I have checked many times.

我的手风琴:-

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

                    <b style="color: Black">

                        <%#Eval("Ques")%>
                    </b>

                </HeaderTemplate>


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

                </ContentTemplate>
            </cc1:Accordion>

css

我输入的CSS类名称不正确或是什么????

@denis ..它仍然不显示图像.也无法在Firebug中找到图像

推荐答案

首先,我建议看一下

Firstly, I would suggest to take a look at Accordion sample page which lists all available properties along with their descriptions. You'll notice that the Accordion also exposes HeaderSelectedCssClass property - this is where you set a style for the collapsed state. So, you could re-write your markup like so:

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

对于CSS:

<style type="text/css">
    .accordionHeader {         
        cursor: pointer;         
        margin-top: 10px;         
        margin-left: 20px;
    }         

    .toggler {
        background: url('../../images/arrow-collapsed.png') no-repeat left center transparent;
    }         

    .toggler-expanded {
        background: url('../../images/arrow-expanded.png') no-repeat left center transparent;
    }

    .accordionContent { 
         margin-top: 10px;         
         margin-left: 20px;         
    }   
  </style>

请删除所有这些脚本.

这篇关于Accordian:即使图像路径正确,箭头图像也不会显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆