Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8343329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:01:29+00:00 2026-06-09T06:01:29+00:00

To detect if a browser support translate3d we can use ( WebKitCSSMatrix in window

  • 0

To detect if a browser support translate3d we can use (WebKitCSSMatrix in window && m11 in new WebKitCSSMatrix())

but now that firefox support translate3d how to have a correct detection of it?

The idea would be to find a solution without using Modernizr.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T06:01:31+00:00Added an answer on June 9, 2026 at 6:01 am

    I needed something similar. I wanted to test if a browser supported translate3d without using a library. I didn’t find any good generic test that wasn’t webkit specific. So after much experimentation, I came up with the following test. I first create a test element, assign a transform function to it, then see if the element retained the transform function.

    function Has3DSupport()
    {
        var sTranslate3D = "translate3d(0px, 0px, 0px)";
    
        var eTemp = document.createElement("div");
    
        eTemp.style.cssText = "  -moz-transform:"    + sTranslate3D +
                              "; -ms-transform:"     + sTranslate3D +
                              "; -o-transform:"      + sTranslate3D +
                              "; -webkit-transform:" + sTranslate3D +
                              "; transform:"         + sTranslate3D;
        var rxTranslate = /translate3d\(0px, 0px, 0px\)/g;
        var asSupport = eTemp.style.cssText.match(rxTranslate);
        var bHasSupport = (asSupport !== null && asSupport.length == 1);
    
        return bHasSupport;
    } // Has3DSupport
    

    The function is plenty fast for my needs: < 50 microseconds in desktop browsers, < 500 microseconds in mobile browsers.

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way that I can detect browser type on routing and use
I'm trying to use this line to detect browser type: IE or Firefox. alert(isBrowser(Microsoft));
How can you detect if the client browser has SSL support? I am not
Normally, i'm using Modernizr for regular feature detection but it can't detect browser selector
I'm trying to use modernizr to test for :nth-child browser support but I'm not
Can I use JavaScript to detect if the user's browser supports gzipped content (client
I really want to make use of multiple background support (Webkit, Firefox 3.6+), but
Does anyone know how can I detect the browser type in css? What I
When my webpage is loading, I use javascript to detect which browser is visiting
Introduction elem.hidden is a new property that allows to hide elements and detect whether

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.