我安装了 JQuery Mobile 和 JQuery Mobile UI。
我尝试使用 JQuery Accordion 选项卡。
<div data-demo-html="true">
<div data-role="collapsible-set" data-theme="c" data-content-theme="d">
<div data-role="collapsible">
<h3>Section 1</h3>
<p>I'm the collapsible content for section 1</p>
</div>
<div data-role="collapsible">
<h3>Section 2</h3>
<p>I'm the collapsible content for section 2</p>
</div>
<div data-role="collapsible">
<h3>Section 3</h3>
<p>I'm the collapsible content for section 1</p>
</div>
</div>
</div>
但是当我想通过例如添加
来更改标题大小时<div data-role="collapsible-set" data-theme="c" data-content-theme="d" class="SystemAccordeonHeading">
类:
SystemAccordeonHeading
现在无论我尝试什么:
.SystemAccordeonHeading {
font-size: 9vw !important;
}
它拒绝了它的新风格并且它仍然很小...... 可能我忽略了一些东西,但此时 JQuery 文档有点简陋。
提前致谢!
最佳答案
将您的类(class)更改为 -
.SystemAccordeonHeading a{
font-size: 9vw;
}
标题实际上是一个链接元素,如果您检查该元素
你不需要 !important
编辑-
请注意,如果您在 Accordion 中放置一个链接,在这种情况下它的字体也会变大。所以我编辑了下面的类,所以你只得到标题。
.SystemAccordeonHeading h3 a{
font-size: 9vw;
}
关于html - 非常奇怪但非常烦人的 JQuery 移动问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28458656/