/home/mjc1/public_html/html/millennium/graph_counter.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<?php include_once("./_common2.php"); ?>
<!-- Ãµ³â°æ¿µERP ±â´É ¼Ò°³ -->
<style>
 /*----õ3»ç¿ë¼º----*/
.graph_layout{background:url('./images/banner_cs3/new/m3_graph_bg.png') center no-repeat;/* height:390px; */}
#counter ul { display:block;height:160px;}
#counter li { position:relative;float:left;margin-right:22px;}
#counter li:last-child { margin-right:0px;}
#counter li .num { position: absolute; left: 30px; top: 30px; width: 100px; height: 40px;color: #333;line-height: 125px; font-size: 17px; text-align: center; z-index: 100; background: #e7eef2; font-weight: bold; width: 120px; height: 120px; border-radius: 120px;letter-spacing:-1px;}
/* #counter li p { margin-top:60px;margin-bottom:15px;padding-top:10px;line-height:1.125em;text-align:center;font-size:1.25em;letter-spacing:-1px;font-weight:600;} */
#counter li p { margin-top:60px;margin-bottom:15px;padding-top:10px;line-height:1.125em;text-align:center;font-size:21px;letter-spacing:-1px;font-weight:600;}
#counter li:not(:nth-child(3)) p{margin-bottom: calc(15px + 1.125em);}
#counter li .num .count { font-family:"Arial Black";font-size:2.75em;} 
#counter li .graph { position:relative;display:block;width:180px;height:90px;overflow:hidden;}
#counter li .graph .graph_bg { position:absolute;left:0;top:0;z-index:-50;}
#counter li .graph .graph_hidden { position:absolute;left:0;top:0;z-index:50;}
/* #panel{ position:absolute;left:-100px;top:90px;width:200px;height:150px;} */
#panel{ position:absolute;left:0px;top:90px;width:180px;height:180px;transform-origin: 50% 0%;}

/* #counter li:nth-child(1){border-bottom: 15px solid #ed4b5b;}
#counter li:nth-child(2){border-bottom: 15px solid #f4b20c;}
#counter li:nth-child(3){border-bottom: 15px solid #12ad7d;}
#counter li:nth-child(4){border-bottom: 15px solid #2191ce;}
#counter li:nth-child(5){border-bottom: 15px solid #7759CC;} */
.panel0 { background:#ed4b5b;}
.panel1 { background:#f4b20c;}
.panel2 { background:#12ad7d;}
.panel3 { background:#2191ce;}
.panel4 { background:#7759CC /* #002c69 */;}
</style>

 


    <div id="counter" style="display:table;    margin: 0 auto;"> 
                <ul>
                    <li>
                        <div class="graph">
                            <img class="graph_bg" src="./images/count_cs3/graph_bg.png" alt="µÞÆÇ">
                            <div id="panel" class='panel_class panel0'></div>
                            <img class="graph_hidden" src="./images/count_cs3/graph_hidden.png" alt="µÞÆÇ">
                        </div>
                        <div class="num"><span class="count">50</span>%</div>
                        <p>ÀΰǺñ Àý°¨</p>
                    </li>
                    <li>
                        <div class="graph">
                            <img class="graph_bg" src="./images/count_cs3/graph_bg.png" alt="µÞÆÇ">
                            <div id="panel" class='panel_class panel1'></div>
                            <img class="graph_hidden" src="./images/count_cs3/graph_hidden.png" alt="µÞÆÇ">
                        </div>
                        <div class="num"><span class="count">60</span>%</div>
                        <p>¾÷¹«½Ã°£ ´ÜÃà</p>
                    </li>
                    <li>
                        <div class="graph">
                            <img class="graph_bg" src="./images/count_cs3/graph_bg.png" alt="µÞÆÇ">
                            <div id="panel" class='panel_class panel2'></div>
                            <img class="graph_hidden" src="./images/count_cs3/graph_hidden.png" alt="µÞÆÇ">
                        </div>
                        <div class="num"><span class="count">85</span>%</div>
                        <p>½Å¼Ó ¡¤ Á¤È®ÇÑ<br>¾÷¹«Ã³¸®</p>
                    </li>
                    <li>
                        <div class="graph">
                            <img class="graph_bg" src="./images/count_cs3/graph_bg.png" alt="µÞÆÇ">
                            <div id="panel" class='panel_class panel3'></div>
                            <img class="graph_hidden" src="./images/count_cs3/graph_hidden.png" alt="µÞÆÇ">
                        </div>
                        <div class="num"><span class="count">100</span>%</div>
                        <p>½Ç½Ã°£ ¾÷¹«ºÐ¼®</p>
                    </li>
                    <li>
                        <div class="graph">
                            <img class="graph_bg" src="./images/count_cs3/graph_bg.png" alt="µÞÆÇ">
                            <div id="panel" class='panel_class panel4'></div>
                            <img class="graph_hidden" src="./images/count_cs3/graph_hidden.png" alt="µÞÆÇ">
                        </div>
                        <div class="num"><span class="count">70</span>%</div>
                        <p>´ë¿Ü½Å·Úµµ Çâ»ó</p>
                    </li>
                </ul>
           </div><!-- //counter-->

<script type="text/javascript"  src="./js/jquery-animate-css-rotate-scale.js"> </script>
<script>
    $(document).ready(function(){ //¿ø±×·¡ÇÁ ¾Ö´Ï¸ÞÀ̼Ç
        initEventListener(); //À̺¥Æ® ÃʱâÈ­ 

        base_top = 5000;
        item_top = 160;
        $(window).scroll(function(){
            var vv = parseInt($(window).scrollTop())+parseInt($(window).height());

            for(i=1;i<18;i++){
                if(vv > (base_top + item_top*i) ){ $("#support .support_list ul").eq(i-1).show("slow"); }
            }

            //initEventListener(); //À̺¥Æ® ÃʱâÈ­ 
        });
        $("#support .support_list ul").each(function(){
            $(this).hide();
        });
        
        /*
        var vv = parseInt($(window).scrollTop())+parseInt($(window).height());
        for(i=1;i<18;i++){
            if(vv>(base_top+item_top*i)){ $("#support .support_list ul").eq(i-1).show("slow"); }
        }
        */
    });

    //À̺¥Æ® ÃʱâÈ­
    /*function initEventListener(){
        $("#panel").animate({rotate: '140deg', scale: 1.5, top:"-30px"}, 1000);
        $(".panel_class").each(function(idx){
            if(idx==0){
                $(this)    .animate({rotate: '175deg', scale: 1.2, top:"-80px", left:"-10px"}, 1000);
            }
            if(idx==1){
                $(this)    .animate({rotate: '86deg', scale: 1.2, top:"-30px"}, 1000);
            }
            if(idx==2){
                $(this)    .animate({rotate: '78deg', scale: 1.2, top:"10px"}, 1000);
            }
            if(idx==3){
                $(this)    .animate({rotate: '40deg', top:"40px"}, 1000);
            }
            if(idx==4){
                $(this)    .animate({rotate: '180deg', top:"-50px", left:"0px"}, 1000);
            }
        });
    }*/

    //À̺¥Æ® ÃʱâÈ­
    function initEventListener(){
        //$("#panel").animate({rotate: '140deg', scale: 1.5, top:"-30px"}, 1000);
        var vv = parseInt($(window).scrollTop())+parseInt($(window).height());
        var graph = $('.graph_layout').offset().top;

        if(vv > graph){
            $(".panel_class").each(function(idx){
                if(idx==0){
                    $(this)    .animate({rotate: '90deg'}, 2000);
                }
                if(idx==1){
                    $(this)    .animate({rotate: '102deg'}, 2000);
                }
                if(idx==2){
                    $(this)    .animate({rotate: '153deg'}, 2000);
                }
                if(idx==3){
                    $(this)    .animate({rotate: '180deg'}, 2000);
                }
                if(idx==4){
                    $(this)    .animate({rotate: '126deg'}, 2000);
                }
            });
            $('.count').each(function () { //¼ýÀÚ ¾Ö´Ï¸ÞÀ̼Ç
                $(this).prop('counter',0).animate({
                    counter: $(this).text()
                }, {
                    duration: 4000,
                    easing: 'swing',
                    step: function (now) {
                        $(this).text(Math.ceil(now));
                    }
                });
            });
        }

        $(window).scroll(function(){
            var vv = parseInt($(window).scrollTop())+parseInt($(window).height());
            var graph = $('.graph_layout').offset().top;
            //console.log(graph);

            if(vv > graph){
                $(".panel_class").each(function(idx){
                    if(idx==0){
                        $(this)    .animate({rotate: '90deg'}, 2000);
                    }
                    if(idx==1){
                        $(this)    .animate({rotate: '102deg'}, 2000);
                    }
                    if(idx==2){
                        $(this)    .animate({rotate: '153deg'}, 2000);
                    }
                    if(idx==3){
                        $(this)    .animate({rotate: '180deg'}, 2000);
                    }
                    if(idx==4){
                        $(this)    .animate({rotate: '126deg'}, 2000);
                    }
                });
            };
        });
        
    }
</script>