ZK - 更改选项卡的字体大小
我想更改选项卡中文本的字体大小。 这不起作用:
<zk>
<style>
.xxx {
font-size: 28px;
}
</style>
<vlayout style="padding:20px">
<tabbox width="100%">
<tabs>
<tab label="Tab 1" sclass="xxx"/>
<tab label="Tab 2"/>
<tab label="Tab 3"/>
</tabs>
<tabpanels>
<tabpanel>This is panel 1</tabpanel>
<tabpanel>This is panel 1</tabpanel>
<tabpanel>This is panel 1</tabpanel>
</tabpanels>
</tabbox>
</vlayout>
</zk>
我做错了什么?
I want to change the font-size of the text in a tab.
This does not work:
<zk>
<style>
.xxx {
font-size: 28px;
}
</style>
<vlayout style="padding:20px">
<tabbox width="100%">
<tabs>
<tab label="Tab 1" sclass="xxx"/>
<tab label="Tab 2"/>
<tab label="Tab 3"/>
</tabs>
<tabpanels>
<tabpanel>This is panel 1</tabpanel>
<tabpanel>This is panel 1</tabpanel>
<tabpanel>This is panel 1</tabpanel>
</tabpanels>
</tabbox>
</vlayout>
</zk>
What am I doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您必须这样做,那么您可以通过执行以下操作来实现它:
现在,当内容进入选项卡面板时,在选项卡面板上使用 sclass="xxx" 来应用而不是选项卡。
使用
.xxx *
意味着该 css 类将应用于tabpanels
以及所有子组件。此外,还需要覆盖子组件使用的任何font-size
设置注意:这种覆盖方式不推荐,因为大多数组件都依赖在他们自己的CSS设置上保持一致的外观和效果所有浏览器上的感觉和行为
If you have to have this then you can achieve it by doing the following
now use sclass="xxx" on tabpanels to apply instead of tab as the content goes into tabpanels.
Using
.xxx *
means this css class will be applied to thetabpanels
as well as all children component. Also !important is required to override anyfont-size
settings used by children componentsNote: This way of overriding is NOT recommended as most components rely on their own css settings for consistent look & feel as well as behavior across all browsers