CSS3 - Reflections

1st July 2011

Firefox 4 & 5, Safari and Chrome

The Hay Wain

John Constable

He committed himself to a career as an artist only in 1799, when he joined the Royal Academy Schools and it was not until 1829 that he was grudgingly made a full Academician, elected by a majority of only one vote.

copyright © stu nicholls - CSS play

Information

It is generally known that Safari and Chrome have support for 'box-reflect' to mirror and fadeout any element which can be used to produce a reflection of the original element. But now with the arrival of Firefox 4 & 5 it is now possible, using an entirely different method, to produce a similar reflection and fadeout for any element.

The above demonstrations uses a Firefox specific style '-moz-element' to place a copy of any element with an id into the background of another element and then apply a CSS mask to that element using a separate svg file.

This is not just a separate copy of the element, try selecting text in the main element and see it also selected in the reflected element.

Once browsers support CSS mask-image then this can be applied to all the latest browsers, doing away with the need for the svg mask.


Copyright

Because of all the time and effort spent in producing this demonstration
I would ask that you respect my copyright.

  1. If you are using this on a personal web site then please add a link back to CSSplay and retain any copyright comment in the stylesheet.
    A donation to the 'Support CSSplay' fund would be appreciated.
  2. If you are using this on a commercial web site, or as a paying job for a client, then please email me asking for permission - stu{at}cssplay.co.uk and in this case a donation to the 'Support CSSplay' fund is required.
  3. If you are having problems integrating any of my demonstrations into your website then I now offer a service to fault find and correct any errors that you may have introduced. Please email me for more information.

Please Support CSS play

Please note that if your donation is for a demo/menu then you will need to email me with the url of the demo/menu after making the donation

For more CSS demonstrations I recommend that you visit the Dynamic Drive CSS Library.


Free, practical CSS menus, layouts, and examples

Follow CSS play


Facebook   Twitter   Facebook Fan Page