<!DOCTYPE html><head>? ? <meta charset="utf-8">? ? <title>制作簡(jiǎn)單的動(dòng)畫效果</title>? ? <script src="http://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script>? ? <link href="style.css" rel="stylesheet" type="text/css" />? ? <style>? ? span {? ? ? ? float: left;? ? ? ? border: solid 1px #ccc;? ? ? ? margin: 0px 8px;? ? ? ? background-color: Blue;? ? ? ? color: White;? ? ? ? vertical-align: middle? ? }? ? </style></head><body>? ? <h3>制作簡(jiǎn)單的動(dòng)畫效果</h3>? ? <span></span>? ? <div id="tip"></div>? ? <script type="text/javascript">? ? $(function() {? ? ? ? $("span").animate({? ? ? ? ? ? ? ? width: "80px",? ? ? ? ? ? ? ? height: "80px",? ? ? ? ? ? ? ? filter: "alpha(opacity:30)", ?/*如果把這一行放到 opacity:"0.3" ?的后面 ? IE5-8 ?就不會(huì)有透明的效果了 ?這是什么原因? ? ? ? ?如果在css里面寫 ?這兩個(gè)順序是沒有任何問題的 ? 所以我覺得很奇怪 ? 求大神 ?不懂勿擾!!! ? 在線等*/? ? ? ? ? ? ? ? opacity:"0.3"? ? ? ? ? ? },? ? ? ? ? ? 3000,? ? ? ? ? ? function() {? ? ? ? ? ? ? ? $("#tip").html("執(zhí)行完成!");? ? ? ? ? ? });? ? });? ? </script></body></html>
1 回答

慕郎_蓮華
TA貢獻(xiàn)83條經(jīng)驗(yàn) 獲得超16個(gè)贊
jquery 的animate 應(yīng)該有處理兼容~~所以只需要 animate({}opacity:。3)就可以了吧
添加回答
舉報(bào)
0/150
提交
取消