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>
元素跟随窗口缩放