003.update窗口缩放

1.浏览器打开template.html

再将窗口缩小,标签大小没有跟随窗口变化。

2.将template.html另存为update.html,修改fyjs(flyingon所在的<script>代码块),添加的var host=和flyingon.dom_on()。

    <script type="text/javascript">
        var host=flyingon.view({
            host: 'container',
            template: '#template',
            defaults: {
                lay: 'vertical-line',
                pad: '10',
                txt1: '请在此输入',
                txt2: '点击'
            }
        });
        flyingon.dom_on(window, 'resize', function () {
            host.update();
        });
    </script>

元素跟随窗口缩放

发布了30 篇原创文章 · 获赞 2 · 访问量 6423

猜你喜欢

转载自blog.csdn.net/yaochaohx/article/details/87928074
003
今日推荐