nyah
     //防止屏幕滑动
        $(window).on(\'scroll.elasticity\', function (e) {
            e.preventDefault();
        }).on(\'touchmove.elasticity\', function (e) {
            e.preventDefault();
        });
//重设字体大小
        var _resizeFromFont = function () {
            $(\'.content-form>form\').each(function () {
                $(this).css(\'font-size\', $(this).width() * 0.04);
            });
        }
        $(window).resize(function () {
            _resizeFromFont();
        });
        _resizeFromFont();

使用时,css文件中使用em单位,例如font-size: 1em;

分类:

技术点:

相关文章:

  • 2021-05-31
  • 2022-12-23
  • 2021-12-04
  • 2022-12-23
  • 2021-07-19
  • 2022-12-23
  • 2021-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-23
  • 2022-12-23
  • 2021-11-18
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案