CSS3 Transformations showing content outside overflow:hidden region in Firefox/Android

1,280 views

Published on

Some time back I was implementing a functionality for Firefox browsers on Android devices and I found a strange problem - For Firefox > 18 on Android devices if I move an element using CSS3 Transformations inside a parent container with overflow:hidden, then part of the element being moved is displayed outside the overflowed region. It seems like when you move the element it just discards the overflow:hidden property and everything is revealed rather. Normally the content outside overflow:hidden should be cut off from view.
For the full post download this file or visit the actual blog post link: http://jbkflex.wordpress.com/2013/04/04/css3-transformations-showing-content-outside-overflowhidden-region-in-firefoxandroid/

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,280
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

CSS3 Transformations showing content outside overflow:hidden region in Firefox/Android

  1. 1. CSS3 Transformations showingcontent outside overflow:hiddenregion in Firefox/AndroidActual blog post link: http://jbkflex.wordpress.com/2013/04/04/css3-transformations-showing-content-outside-overflowhidden-region-in-firefoxandroid/Some time back I was implementing a functionality for Firefox browsers on Androiddevices and I found a strange problem -For Firefox > 18 on Android devices if I movean element using CSS3 Transformations inside a parent containerwithoverflow:hidden, then part of the element being moved is displayed outside theoverflowed region. It seems like when you move the element it just discards theoverflow:hidden property and everything is revealed rather. Normally the contentoutside overflow:hidden should be cut off from view.I have a simple demo http://rialab.jbk404.site50.net/ffandroidissue/ - an image whichis bigger than the container div is moved using CSS3 Transformations. The div has aoverflow:hidden set to it. There are two buttons. Click on them to see the variousresults. The first button causes the issue whereas the second button resolves it.So this is what causes the issue – moving the image using CSS3 Transformations(for eg. transform:translateX(value);) inside a container with overflow:hiddenAnd this is what solves it – strange !!Adding a background color and an opacity to the container element like this,#container.noissue{-moz-perspective: 1000px;overflow: hidden;background:#ccc;width: 100px;height: 50px;
  2. 2. display: block;position:absolute;top:50px;right:50px;background:#ccc;opacity:0.99;}Check out the demo in Firefox on an Android device. I am not sure if anybody hasencountered this situation. But this definitely seems to be a bug in Firefox forAndroid’s. This is not seen for other browsers.

×