gpt4 book ai didi

asp.net - 调整 ajax asp Accordion 尺寸

转载 作者:太空宇宙 更新时间:2023-11-03 19:11:39 25 4
gpt4 key购买 nike

我非常不熟悉 Accordion 以及如何使用它们,我正在尝试调整 Accordion 的宽度,如何/更简单的方法是什么,我正在使用随附的示例 css它,但我没有看到任何宽度调整。

<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="Server" />
<asp:Accordion ID="MyAccordion" runat="server"
SelectedIndex="0"
HeaderCssClass="accordionHeader"
ContentCssClass="accordionContent"
FadeTransitions="true"
FramesPerSecond="40"
TransitionDuration="250"
AutoSize="None">
<Panes>
<asp:AccordionPane ID = "AccordionPane1" runat = "server">
<Header>
<a href = "" onclick = "return false;" class = "accordionLink"> Section 1</a>
</Header>
<Content>
<p>Thi</p>
</Content>
</asp:AccordionPane>

<asp:AccordionPane ID = "AccordionPane2" runat = "server">
<Header>
<a href = "" onclick = "return false;" class = "accordionLink"> Section 2</a>
</Header>
<Content>
<p>Joe</p>
</Content>
</asp:AccordionPane>

<asp:AccordionPane ID = "AccordionPane3" runat = "server">
<Header>
<a href = "" onclick = "return false;" class = "accordionLink"> Section 3</a>
</Header>
<Content>
<p>So keep yoow Micro</p>
</Content>
</asp:AccordionPane>

<asp:AccordionPane ID = "AccordionPane4" runat = "server">
<Header>
<a href = "" onclick = "return false;" class = "accordionLink"> Section 4</a>
</Header>
<Content>
<p>>test</p>
</Content>
</asp:AccordionPane>
</Panes>
</asp:Accordion>


.accordionHeader
{
border: 1px solid #2F4F4F;
color: white;
background-color: #2E4d7B;
font-family: Arial, Sans-Serif;
font-size: 12px;
font-weight: bold;
padding: 5px;
margin-top: 5px;
cursor: pointer;
}

.accordionContent
{
background-color: #D3DEEF;
border: 1px dashed #2F4F4F;
border-top: none;
padding: 5px;
padding-top: 10px;
}

.accordionLink
{
background-color: #D3DEEF;
color: white;
}

.watermark {
background: #FFAAFF;
}

.popupControl {
background-color:#AAD4FF;
position:absolute;
visibility:hidden;
border-style:solid;
border-color: Black;
border-width: 2px;
}

.modalBackground {
background-color:Gray;
filter:alpha(opacity=70);
opacity:0.7;
}

.modalPopup {
background-color:#ffffdd;
border-width:3px;
border-style:solid;
border-color:Gray;
padding:3px;
width:250px;
}

.sampleStyleA {
background-color:#FFF;
}

.sampleStyleB {
background-color:#FFF;
font-family:monospace;
font-size:10pt;
font-weight:bold;
}

.sampleStyleC {
background-color:#ddffdd;
font-family:sans-serif;
font-size:10pt;
font-style:italic;
}

.sampleStyleD {
background-color:Blue;
color:White;
font-family:Arial;
font-size:10pt;
}

最佳答案

您可以为 Accordion 创建一个容器,并通过给它一个宽度来设置 Accordion 的宽度。像这样的东西:

<div id="divAccordionContainer" style="width:500px">
<ajaxToolkit:Accordion ID="MyAccordion" runat="Server">
...
</ajaxToolkit:Accordion>
</div>

关于asp.net - 调整 ajax asp Accordion 尺寸,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8112213/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com