gpt4 book ai didi

html - AF :panelList 上的 css 未知属性 "rendered"

转载 作者:行者123 更新时间:2023-11-28 18:32:28 25 4
gpt4 key购买 nike

我试图在 CSS 文件上设置 af:panelList 的渲染属性,因此我无法根据设备分辨率显示它,但是当我在 CSS 上定义时:

#pl2 {
rendered:false;
}

我“渲染”了一个未知属性,并且 chrome 在分辨率较低时不会隐藏它。

这是我的 .jspx 文件中的组件定义:

<af:panelList  id="pl2" rows="3" maxColumns="5" >

我该怎么做才能解决这个问题?有办法解决吗?

最佳答案

it renders a div with id pt1:panelobile and then a table which has no id. i added this line to the css #pt1:panelmobile { display: none; } but i have no luck so far

如果您忽略像 IE6/7 这样的过时浏览器,那么您应该改用这个选择器:

#pt1\:panelmobile {
display: none;
}

: 是 CSS 选择器中的一个特殊字符,表示伪选择器,因此在使用时需要用 \ 进行转义。

但是,特别是在您的特定情况下,更好的方法是为 JSF 组件分配一个更通用且可重用性更好的样式类。

<af:panelList ... styleClass="hidden">

.hidden {
display: none;
}

另见:

关于html - AF :panelList 上的 css 未知属性 "rendered",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13867913/

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