css3 - CSS perspective not working in Internet Explorer 10 or Firefox -


i've got jquery image scroller simulates depth using perpective , transform: translatez css properties. renders correctly in chrome, not in ie10 or firefox.

here full project (click on "who's coming" menu link see image scroller): http://www.girlguiding.org.uk/test/biggig/index.html , here jsfiddle of relevant code: http://jsfiddle.net/moosefetcher/rxcmr/28/ (i'm not sure why, stackoverflow telling me need include code link jsfiddle, here's css)...

.scroller {     position: relative;     perspective: 150;     -webkit-perspective: 150;     -ms-perspective: 150;     -moz-perspective: 150; } .artistbox {     width: 228px;     height: 268px;     background-color: #000000;     border-radius: 16px;     position: absolute;     overflow: hidden;     z-index: 4; } .artistbox p {     position: absolute;     font-family:"arial", sans-serif;     color: white;     font-size: 22px; } .artistboxfront {     z-index: 5; } .artistboxnew {     z-index: 3;     opacity: 0; } .scrollerbutton {     position: absolute;     top: 128px;     width: 32px;     height: 32px;     border: 2px solid white;     border-radius: 32px;     background-color: #f49d19;     box-shadow: 1px 1px 3px #555588;     z-index: 6; } .scrollerbuttonover {     background-color: #ffaa26;     box-shadow: 2px 2px 3px #555588; } 

note have tried both including , excluding -ms- prefix on properties. (the current jsfiddle includes both, -webkit- , -moz-). know why might not working in ie10? cheers.

unit of length

ie , firefox require unit of length on perspective values (px, em).

   -moz-perspective: 800px;         perspective: 800px; 

for chrome , safari, unit of length optional when using -webkit prefix.

-webkit-perspective: 800;    /* works or without px unit */ 

w3c standards

it's safer add unit of length perspective values. it's more consistent w3c standard. it's 1 approach browsers support. , once chrome , safari start supporting perspective without prefix, it's possible they'll require unit of length (for consistency w3c standards , other browsers).

-webkit-perspective: 800px;    -moz-perspective: 800px;         perspective: 800px; 

note: current info on w3schools.com outdated. there's no mention of support ie10 or firefox, , examples not have unit of length. more-recent examples on developer.mozilla.org include unit of length, consistent w3c standards.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -