首页 > avalon2的例子为何运行时无效果呢

avalon2的例子为何运行时无效果呢

<body ms-controller="test">
    <script>
        avalon.define({
            $id: 'test',
            obj: {color: 'blur ', 'text-algin': 'center'},//属性名带-,必须用引号括起
            active: {color: 'red'},
            width: 111,
            height:222,
            toggle: false,
            array: [{width:1},{height:2}]
        })

    </script>
  <span ms-css="@obj">直接引用对象</span>
  <span :css="{width: @width, height: @height}">使用对象字面量</span>
  <span :css="@array">直接引用数组</span>
  <span :css="[@obj1, @toggle && @active ]" :click="@active = !@active">选择性添加多余属性或重写已有属性</span>
</body>

这是一个例子,但在多种浏览器下运行都不能显示效果,
2,avalon2能运用于php之类的环境吗?


这是我一些错别字失误,已经修正了

http://avalonjs.coding.me/dir...

【热门文章】
【热门文章】