代码之家  ›  专栏  ›  技术社区  ›  Alex

非常奇怪但非常烦人的JQuery移动问题

  •  0
  • Alex  · 技术社区  · 10 年前

    我安装了JQuery mobile和JQuery mobile UI。

    我尝试使用JQuery手风琴选项卡。

        <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 {
    font-size: 9vw !important;
    }
    

    它拒绝它的新风格,它仍然很小。。。。 也许我忽略了一些东西,但JQuery文档在这一点上有点破旧。

    提前感谢!!

    1 回复  |  直到 10 年前
        1
  •  0
  •   el3ien    10 年前

    将您的班级更改为-

    .SystemAccordeonHeading a{
    font-size: 9vw;
    }
    

    如果检查元素,标题实际上是一个链接元素

    你不需要!重要的

    编辑-

    请注意,如果你在手风琴上放一个链接,在这种情况下,它的字体也会变大。所以我编辑了下面的类,所以你只能得到标题。

    .SystemAccordeonHeading h3 a{
    font-size: 9vw;
    }