gpt4 book ai didi

jquery - Primefaces + jQuery + 三角形图标(未显示)!

转载 作者:太空宇宙 更新时间:2023-11-04 15:07:11 24 4
gpt4 key购买 nike

我在 jQuery 中使用 primefaces(我猜是因为我在使用的模板中有这一行)

<h:outputScript library="primefaces" name="jquery/jquery.js" target="head"/>

所以当我使用它时应该是:(来自 here )

<p:accordionPanel multiple="true">
<p:tab title="Godfather Part I">
<h:panelGrid columns="2" cellpadding="10">
<p:graphicImage name="demo/images/godfather/godfather1.jpg" />
<h:outputText
value="The story begins as Don Vito Corleone..." />
</h:panelGrid>
</p:tab>
<p:tab title="Godfather Part II">
<h:panelGrid columns="2" cellpadding="10">
<p:graphicImage name="demo/images/godfather/godfather2.jpg" />
<h:outputText value="Francis Ford Coppola's legendary..." />
</h:panelGrid>
</p:tab>
<p:tab title="Godfather Part III">
<h:panelGrid columns="2" cellpadding="10">
<p:graphicImage name="demo/images/godfather/godfather3.jpg" />
<h:outputText value="After a break of more than 15 years...." />
</h:panelGrid>
</p:tab>
</p:accordionPanel>

我应该看到一个完整可用的 Accordion 。好吧,我明白了,除了三角形图标之外的所有内容。

检查后,我发现在每个选项卡中呈现的跨度如下:

<h3 class="ui-accordion-header ui-helper-reset ui-state-default ui-corner-all tab-in-accordion" role="tab" aria-expanded="false">
<span class="ui-icon ui-icon-triangle-1-e"></span>
Godfather Part I
</h3>

问题在 <span class="ui-icon ui-icon-triangle-1-e"></span> 中但是类ui-icon-triangle-1-e在 chrome 检查器中没有显示。我读过,我知道类是提供背景和位置的类(使用 jquery 中的图标)。

如何解决此问题并显示三角形?

最佳答案

这是 bootstrap theme.css 的主题定义问题。如果您检查了 CSS,就会注意到它。将以下内容添加到您的主 css 文件中,使三角形图标可见。

.ui-accordion .ui-accordion-header .ui-icon { display: block; }

关于jquery - Primefaces + jQuery + 三角形图标(未显示)!,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25433801/

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