神奇的overflow:hidden

十月 26th, 2009 / No Comments » / by iwill

经常碰到在内层设margin-top, 结果却是外层跟上面有了 margin。

像这样:
.a{ width:100px; height:100px; background:#000; }
 .b{ width:50px; height:30px; background:#666; margin:20px;}
<div class=”a”>
<div class=”b”></div>
</div>

然后,给.a加下,overflow:hidden; 行了吧。

IE 6 7 8 , FF ,CHROME, OPERA全部有效

Tags:

悲剧了。。。

十月 15th, 2009 / No Comments » / by iwill

哥真是一个悲剧帝。

AS3使动态载入的图片平滑显示(Keywords:Flash,图片, 旋转,变模糊)

九月 29th, 2009 / No Comments » / by iwill

FLASH IDE里有个选项可以使导入的位图平滑显示,在缩放和旋转的时候不会产生太大的失真。

Allow-Smoothing

对于动态载入的图片:
package {
    import flash.display.Sprite;
    import flash.display.Loader;
    import flash.net.URLRequest;
    import flash.events.*;
    import flash.display.Bitmap;

    public class Thumbnail extends Sprite {

        private var url:String;
        private var loader:Loader;
        private var urlRequest:URLRequest;

        function Thumbnail(source:String):void {
            url=source;
            drawLoader();          
           

        }
        private function drawLoader():void {
            urlRequest=new URLRequest(url);
            loader=new Loader;
           
            loader.load(urlRequest);

            loader.contentLoaderInfo.addEventListener(Event.COMPLETE,doneIt);

           
        }
        private function doneIt(e:Event){

            var bit:Bitmap = e.target.content;
           
            if(bit != null){
            bit.smoothing = true;
            }

            addChild(loader);

           
        }
    }
}

亦歌

八月 26th, 2009 / No Comments » / by iwill

http://www.1g1g.com

有时候,会有那么一点点惊喜

Untitled

八月 10th, 2009 / No Comments » / by iwill

Read more…

六月十三日厦门(2)

七月 27th, 2009 / No Comments » / by iwill

Read more…

WALL.E

七月 15th, 2009 / No Comments » / by iwill

WALLE&EVE

Read more…

六月十三日厦门(1)

七月 10th, 2009 / 2 Comments » / by iwill

六月十三日与娘子及友大帝扁豆卢少一行五人同游厦门。

鼓浪玙

鼓浪玙

Read more…

老婆拍的

七月 7th, 2009 / No Comments » / by iwill

5million

5million

Read more…

AS3背景全屏

五月 20th, 2009 / 1 Comment » / by iwill

来自 http://www.blog.noponies.com/

背景可载入SWF或图片

下载

示例

Tags: ,