开发者

-webkit-box-reflect and position:absolute

I have the following HTML code snippet running on Chrome Canary build

<div id="debug" class="debug" >TEST</div>

Also, I have the following CSS code snippet

-webkit-box-reflect: below 0px
                     -webkit-gradient(linear, left top, left bottom, 
                     from(transparent), to(rgba(255, 255, 255, 0.5)));

It works as expected. It shows the reflection of the word TEST.

But the reflection does not work when I have add the position:absolute as the following:

    position: absolute;
    -webkit-box-reflect: below 0px
                     -webkit-gradient(linear, left top, left bottom, 
                     from(transparent), to(rgba(255, 255, 255, 0.5)));

What do I need to ma开发者_开发百科ke it the -webkit-box-reflect work with position:absolute? Thanks in advance for your help.


Make a div around the div/tag you're using for "test".And make that one absolute.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜