iframe覆盖onclick变换

时间:2012-08-30 11:10:50

标签: javascript css iframe onclick transform

只是想知道我是否走在正确的轨道上......也许还有一些帮助 提到这个问题 CSS Animation onClick

    $(#alpha).onClick(function({
    $('#alpha').addClass('.blowup');});

.blowup {
-webkit-transform: scale(1.5);
   -moz-transform: scale(1.5);
    -ms-transform: scale(1.5);
     -o-transform: scale(1.5);
        transform: scale(1.5);
}

这不起作用 - > http://jsfiddle.net/HQjMc/50/ z-index的东西?我确实有一个href onclick叠加层似乎不会影响目标iframe ...谢谢

1 个答案:

答案 0 :(得分:1)

以下是仅限CSS的解决方案:

HTML

<div id='alpha'>
    <iframe src="http://time.is"></iframe>
</div>​

CSS

#alpha {
    opacity:0.38;
    filter:alpha(opacity=38);

  -webkit-transition: all 0.3s ease-out; 
     -moz-transition: all 0.3s ease-out; 
       -o-transition: all 0.3s ease-out; 
          transition: all 0.3s ease-out; 

    -moz-transform:scale(0.25);
    -moz-transform-origin:0 0;
    -o-transform:scale(0.25);
    -o-transform-origin:0 0;
    -webkit-transform:scale(0.25);
    -webkit-transform-origin:0 0 
}

#alpha:hover {
    opacity:0.38;
    filter:alpha(opacity=38);

    -webkit-transform: scale(1.5);
       -moz-transform: scale(1.5);
        -ms-transform: scale(1.5);
         -o-transform: scale(1.5);
            transform: scale(1.5);
}

#alpha > iframe {
    positon:fixed;
    zoom:1;
}

实施例

fiddle

ps:这不适用于Internet Explorer