大家直接自己看吧,请多多指教,这个是几个月前写的,现在全部整理一下。 复制代码 代码如下: <BR>body,div,a,span{margin:0;padding:0;} <BR>.g-pt-10{ padding-top:10px; } <BR>.g-ta-c{ text-align:center; } <BR>.g-fz-16{ font-size:16px; } <BR>.g-d-b{ display:block; } <BR>.g-f-l{ float:left; } <BR>.g-c-w{ color:#fff; } <BR>.g-fz-18{ font-size:18px; } <BR>.g-d-ib{ display:inline-block; } <BR>.g-cf:after { content:""; clear:both; display:table; } <BR>.g-cf { zoom:1; } <br><br><BR>a:hover{ text-decoration:none; color:#ff0000; } <BR>.box{ width:705px; height:242px; margin:50px auto; background:#f5f9fe; border:1px solid #6888a1; } <BR>div.mid{ width:330px; margin:20px auto; } <BR>a.support{ width:124px; height:73px; background:#008DCA url("support.png"); margin-right:80px; } <BR>a.oppose{ width:124px; height:73px; background:#F78106 url("oppose.png"); } <BR>.g-mt-45{ margin-top:45px; } <BR>span.line{ width:380px; height:17px; margin:0 auto; background:#008DCA; } <BR>span.line2{ width:80px; height:17px; background:#F78106; } <br><br> 如果微信将会进行收费,你将会怎么办? 0 0 0% 0% <BR>var sup=parseInt($('#supamount').text()); <BR>var opp=parseInt($('#oppamount').text()); <br><br>function support(){ <BR>sup+=1; <BR>$('#supamount').text(sup.toString()); <BR>$('#suppercent').text(((sup/(sup+opp))*100).toFixed(0).toString()); <BR>$('#opppercent').text((100-(sup/(sup+opp))*100).toFixed(0).toString()); <BR>$('#supline').attr("style","width:"+380*(sup/(sup+opp))+"px"); <BR>} <BR>function oppose(){ <BR>opp+=1; <BR>$('#oppamount').text(opp.toString()); <BR>$('#suppercent').text(((sup/(sup+opp))*100).toFixed(0).toString()); <BR>$('#opppercent').text((100-(sup/(sup+opp))*100).toFixed(0).toString()); <BR>$('#supline').attr("style","width:"+380*(sup/(sup+opp))+"px"); <BR>} <BR>