简体   繁体   中英

CSS3 - transition-delay only on close?

a {
background: white;    
transition: background 1s ease;
transition-delay: 1s;
}

b {
background: black;
}

This makes the transition close after 1s, but also start. Would it be possible to make it open immediately but close after 1s?

Use the following code instead of yours. Let me know :

a {
  background: white;    
  transition: background 1s ease;
  transition-delay: 0s;
  transition-duration:5s;
  }

b {
 background: black;
 }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM