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 8287117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:56:53+00:00 2026-06-08T11:56:53+00:00

In my app I’m animating the opacity of elements on the page with something

  • 0

In my app I’m animating the opacity of elements on the page with something like:

.s {
    transition-property: opacity;
    transition-duration: 250ms;
}

(with vendor-specific versions, of course). And then

.s.hidden {
    opacity: 0;
}

So the animation starts when the hidden class is assigned. Problem is, mouse events are still detected on elements with opacity zero, which I don’t want, so I need to either set visibility to hidden or display to none after the transition is finished. I would hope to be able to do something like:

.s {
    transition-property: opacity, visibility;
    transition-duration: 250ms;
    transition-delay:    0, 250ms;
}

and then

.s.hidden {
    opacity: 0;
    visibility: hidden;
}

to use the CSS transition machinery to do this painlessly. As far as I can tell, that doesn’t work because visibility is a non-animatable property. But other transition frameworks such as d3 do handle non-animatable properties, in the obvious way by simply setting the value when the transition starts, or when it ends.

The best I’ve been able to come up with is to use the transitionend event (and its browser-specific variants such as oTransitionEnd) to catch the end of the transition and set visibility at that point, but I’m wondering if there’s any easier way, preferably sticking purely to CSS. Or, as the title of my question implies, are non-animatable properties just that?

  • 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-08T11:56:54+00:00Added an answer on June 8, 2026 at 11:56 am

    visibility is an animatable property, see the spec.

    Which means your .hidden class will work as you have described. Demo here: http://jsfiddle.net/ianlunn/xef3s/

    Edit: the spec isn’t perfectly clear:

    visibility: if one of the values is ‘visible’, interpolated as a
    discrete step where values of the timing function between 0 and 1 map
    to ‘visible’ and other values of the timing function (which occur only
    at the start/end of the transition or as a result of ‘cubic-bezier()’
    functions with Y values outside of [0, 1]) map to the closer endpoint;
    if neither value is ‘visible’ then not interpolable.

    But this is what I believe it means:

    visibility doesn’t smoothly animate between a range of visible and hidden in the way that opacity animates between 1 – 0. It simply switches between visible and hidden at the start and end states of the transition.

    Providing the transition is either going to or from visibility, then a transition will occur. If trying to transition between visibility: hidden and visibility: collapse for example, those values are “not interpolable” and the transition would not occur.

    So in my example, opacity causes the element to fade out and then at the end of the transition, visibility snaps to hidden.

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

Sidebar

Related Questions

app link: http://itunes.apple.com/en/app/quick-tweet/id505987287?mt=12 How can i make something like that circle? is that a
My app uses the android.support.v4.view.ViewPager class. For each page in the ViewPager, I want
App is in prism/mvvm/mef and uses loading by attribute like StockTraderRI. My shell window
My app only allows access if the current user is a specific type, this
App I'm working on uses ARC. I wanted it to process large files, so
/app/config/parameters.ini [parameters] database_driver = pdo_mysql database_host = localhost database_port = database_name = my_dbname database_user
App Engine only allows you to use these formats for XMPP addresses: app-id@appspot.com anything@app-id.appspotchat.com
app.get('/', function (req, res) { res.render('home.jade', { results: req.session.value }); }); What i would
My app will no longer run under Snow Leopard, even though it was originally
My app got rejected by Apple three times, all with the same rejection letter,

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.