Adobe Edge生成的代码是否符合良好的编程习惯?

时间:2011-10-05 18:33:02

标签: css html5 adobe

我是一名长期的as3设计师,想要将脚趾插入html5池中。 Adobe的边缘似乎很高兴,但它是否会制作出任何人都想看的代码?

1 个答案:

答案 0 :(得分:0)

不,完全没有。

基本页面如下所示:

<!DOCTYPE html>
<html>
<head>
    <title>Adobe EDGE TEST August 1, 2011</title>
<!--Adobe Edge Runtime-->
    <script type="text/javascript" src="edge_includes/jquery-1.4.2.min.js"></script>
    <script type="text/javascript" src="edge_includes/jquery.easing.1.3.js"></script>
    <script type="text/javascript" src="edge_includes/edge.0.1.1.min.js"></script>
    <script type="text/javascript" src="edge_includes/edge.symbol.0.1.1.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="adobe_edge_test_edge.js"></script>
    <link rel="stylesheet" href="adobe_edge_test_edge.css"/>
<!--Adobe Edge Runtime End-->


<script type="text/JavaScript">
<!--
function timedRefresh(timeoutPeriod) {
    setTimeout("location.reload(true);",timeoutPeriod);
}
//   -->
</script>

</head><body onload="JavaScript:timedRefresh(4000);">
    <div id="stage" class="symbol_stage">
    </div>
</body>
</html>

看起来不错,直到你注意到没有内容,所以SEO完全毁了。

它使用JS来创建内容并为其设置动画,并且不使用CSS过渡或动画。这是Javascript的片段:

      dom: [
        {
            id:'Text1',
            type:'text',
            rect:[98,120,385,150],
            text:"A test using Edge",
            font:["Arial Black, Gadget, sans-serif",[24,""],"rgba(0,0,0,1)","normal","none",""],
        },
        {
            id:'RoundRect2',
            type:'rect',
            rect:[187,332,45,41],
            borderRadius:[47,47,47,47],
            fill:['rgba(255,255,0,1)'],
            stroke:[0,"rgb(0, 0, 0)","none"],
        },
        {
            id:'Text3',
            type:'text',
            rect:[79,270,0,0],
            text:"Here's another paragraph",
            align:"auto",
            font:["Times",16,"rgba(0,0,0,1)","normal","none","normal"],
        },

这是一些动画位:

{ id: "eid29", tween: [ "transform", "#Rectangle1", "skewY", '43deg', { valueTemplate: undefined, fromValue: '0deg'}], position: 220, duration: 280, easing: "linear" },
            { id: "eid2", tween: [ "color", "#stage", "background-color", 'rgba(215,215,215,1.00)', { animationColorSpace: 'RGB', valueTemplate: undefined, fromValue: 'rgba(215,215,215,1.00)'}], position: 0, duration: 0, easing: "linear" },
            { id: "eid308", tween: [ "color", "#stage", "background-color", 'transparent', { animationColorSpace: 'RGB', valueTemplate: undefined, fromValue: 'rgba(215,215,215,1)'}], position: 750, duration: 750, easing: "linear" },
            { id: "eid76", tween: [ "transform", "#Text3", "translateY", '-267px', { valueTemplate: undefined, fromValue: '0px'}], position: 750, duration: 250, easing: "linear" },
            { id: "eid15", tween: [ "style", "#Rectangle1", "opacity", '0.84705882352941', { valueTemplate: undefined, fromValue: '0.84705882352941'}], position: 65, duration: 0, easing: "linear" },
            { id: "eid17", tween: [ "style", "#Rectangle1", "opacity", '0.84705882352941', { valueTemplate: undefined, fromValue: '0.84705882352941'}], position: 500, duration: 0, easing: "linear" },
            { id: "eid72", tween: [ "transform", "#RoundRect2", "scaleY", '3.07', { valueTemplate: undefined, fromValue: '3.07'}], position: 735, duration: 0, easing: "easeInCirc" },
            { id: "eid98", tween: [ "transform", "#RoundRect2", "scaleY", '3.07', { valueTemplate: undefined, fromValue: '3.07'}], position: 940, duration: 0, easing: "linear" },
            { id: "eid67", tween: [ "transform", "#RoundRect2", "rotateZ", '-85deg', { valueTemplate: undefined, fromValue: '-85deg'}], position: 735, duration: 0, easing: "easeInCirc" },
            { id: "eid100", tween: [ "transform", "#RoundRect2", "rotateZ", '-85deg', { valueTemplate: undefined, fromValue: '-85deg'}], position: 940, duration: 0, easing: "linear" },
            { id: "eid93", tween: [ "transform", "#Text4", "translateY", '-14px', { valueTemplate: undefined, fromValue: '0px'}], position: 750, duration: 250, easing: "linear" },
            { id: "eid71", tween: [ "transform", "#RoundRect2", "scaleX", '3.07', { valueTemplate: undefined, fromValue: '3.07'}], position: 735, duration: 0, easing: "easeInCirc" },

所以,没有内容,没有转换/动画,JS是一个难以维护的混乱。

除此之外,没关系。