javascript - JQuery Mobile - 覆盖整个 body 的字体系列主题

标签 javascript css jquery-ui jquery-mobile themeroller

我最近在我的网站上添加了 jQuery Mobile。

但是,jQuery 主题打破了我以前的字体。虽然我的大部分页面都运行良好,尤其是漂亮的 jQuery Mobile slider ,但我在字体方面遇到了真正的问题。

我设置了自定义字体,它们在没有 jquery 移动 CSS 的情况下也能正常工作。但是,一旦我包含 jquery 移动 css,它就会覆盖我的字体。

我已经尝试将 data-role= "none"添加到正文和 div,但这没有帮助。

我也尝试过添加 data-theme = "none"但这也无济于事。

有没有办法在我的页面主体上禁用 jQuery 自定义字体系列主题?

感谢您的帮助。

最佳答案

这是我用 Android 4.0 ICS 字体 Roboto 替换整个应用程序字体的 CSS。

  @font-face {
    font-family: 'RobotoRegular';
    src: url('../font/roboto/RobotoRegular.eot');
    src: url('../font/roboto/RobotoRegular.eot?#iefix') format('embedded-opentype'),
         url('../font/roboto/RobotoRegular.woff') format('woff'),
         url('../font/roboto/RobotoRegular.ttf') format('truetype'),
         url('../font/roboto/RobotoRegular.svg#RobotoRegular') format('svg');
    font-weight: normal;
    font-style: normal;
  }

  /* Android jQM Font Style Overrides */
  body  * {
    font-family: "RobotoRegular" !important;
    font-weight: normal !important;
  }

如果以上内容还不够,您可能还必须定位特定元素。我还必须包括以下内容:

  .ui-btn-up-a,.ui-btn-hover-a,.ui-btn-down-a,.ui-bar-a,.ui-body-a,.ui-btn-up-a,.ui-btn-hover-a,.ui-btn-down-a,.ui-body-a input,.ui-body-a select,.ui-body-a textarea,.ui-body-a$
    font-family: "RobotoRegular";
  }

我希望你来对了。祝你好运。

关于javascript - JQuery Mobile - 覆盖整个 body 的字体系列主题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9403868/

相关文章:

javascript - JQuery 返回 2 个不同的 ID

使用 bootstrap css 的 MVC 5 Razor Page 中的 HTMl 布局没有显示我想要的方式

javascript - Div 在被拖动时自动调整大小(jQuery UI)

javascript - jQuery RTE 建议

jQuery UI Slider - 需要记住浏览器上的值 "Back"

javascript - 如何使用客户端/服务器架构执行Linux命令

javascript - 我如何使用 jQuery 同时选择 'this' 和其他内容?

javascript - Jquery 让 child 有条件

css - 滚动固定元素的内容没有发生

twitter-bootstrap - 一行内列的高度相等