作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我试图在 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/
我试图在 CSS 文件上设置 af:panelList 的渲染属性,因此我无法根据设备分辨率显示它,但是当我在 CSS 上定义时: #pl2 { rendered:false; } 我“渲染”
我是一名优秀的程序员,十分优秀!