第240天:Home版首页还剩最后一个Flash,用于IE6下png背景透明的js

星期四 晴 -1~9℃

Home版首页已处理计划中的三处Flash

原计划首页会有总共 4 处 Flash 应用,但是在页面制作过种中,抛弃了 2 处,而用 JS 代替,所以首页只剩下 2 处 Flash。原计划的 4 处,目前已完成 3 处,接下去做最后一处,此处为 Home 版核心,春节回来尚需继续处理。

突然想起“公司项目”来。在大多数的公司项目中,领导最关心的是如何尽快完成即定需求。而我们这样的自发团队项目,最关心的是如何尽量做得更好更合理。两者有着质的区别,一种是完成任务的心态,一种是发自内心的心态,一种是僵死,一种是灵活。这是为什么在企业中难以诞生优秀团队的根本原因之一。


这个转让火车票的电话长时间“正在通话中”

早上 8 点多刚到公司就看到酷讯网上的这条转让信息,发布时间显示 8 小时前,那么应该是昨晚12点左右发布的。打了好几个都“正在通话中”,不打了。到 10 点多又打,通了,吸取了昨天的教训,确定了发车日期是 22 号。对方说人在火车东站,再结合“电话长时间正在通话中”一想,多半是黄牛,但手续费只要 44,票价 256,正好凑到 300,不算高,只希望不要是假票就好。

请了假出去,只有两站路,很快就到了火车东站,但是接下去整整打了半小时电话,隔几秒就打一个,手机打掉一格电,有一次好不容易打通,可是听起来像被转接到另一台电话上,还是没人接,其余时间全是“正在通话中”。

彻头彻尾的热线,放弃了。突然想,不是有那种打一下就挂断引你打回去的欺诈电话吗?如果用这个手段把电话发布到网上,一天该赚不少吧。


用于IE6下png背景透明的js代码

此前记录了一篇《用于IE6下png图片透明的js》,今天用到 png 背景透明,所以记录一下。这两篇加起来,基本上可以解决 IE6 下 png 透明的问题了。

function alphaBackgrounds(){
   var rslt = navigator.appVersion.match(/MSIE (d+.d+)/, ”);
   var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);
   for (i=0; i<document.all.length; i++){
      var bg = document.all[i].currentStyle.backgroundImage;
      if (bg){
         if (bg.match(/.png/i) != null){
            var mypng = bg.substring(5,bg.length-2);
   //alert(mypng);
            document.all[i].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=’"+mypng+"’, sizingMethod=’crop’)";
            document.all[i].style.backgroundImage = "url(”)";
   //alert(document.all[i].style.filter);
         }                                              
      }
   }
}
if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
   window.attachEvent("onload", alphaBackgrounds);
}

可能会造成以 png 做背景的链接失效,解决方法:在 a 标签上加 position:relative,但是如果是通过 js 触发的背景切换,就不知道怎么办了,下午就在为这事头疼,背景切换不过来。

参考:http://www.coal-wz.com/sam/blog/article.asp?id=12


The Wolves and the Sheep
from http://classics.mit.edu/Aesop/fab.1.1.html#633

"Why should there always be this fear and slaughter between us?" said the Wolves to the Sheep. "Those evil-disposed Dogs have much to answer for. They always bark whenever we approach you and attack us before we have done any harm. If you would only dismiss them from your heels, there might soon be treaties of peace and reconciliation between us." The Sheep, poor silly creatures, were easily beguiled and dismissed the Dogs, whereupon the Wolves destroyed the unguarded flock at their own pleasure.

防狼之心不可无,不要轻信敌对者。

RSS

上一篇:

下一篇:

发表评论

电子邮件地址不会被公开。 必填项已用*标注