Skip to content

Instantly share code, notes, and snippets.

@binnng
Last active December 20, 2015 08:49
Show Gist options
  • Save binnng/6102897 to your computer and use it in GitHub Desktop.
Save binnng/6102897 to your computer and use it in GitHub Desktop.
CSS transition 渐变显示元素
/*
*元素渐变显示
*/
.banner_item{
display: inline-block;
background-size: 100%;
width: 814px;
height: 316px;
overflow: hidden;
background-repeat: no-repeat;
opacity: 0;
-webkit-transition: opacity .3s ease;
-webkit-transform-style: preserve-3d;
}
.banner_item.fadeIn{
opacity: 1;
}
@binnng
Copy link
Author

binnng commented Jul 29, 2013

加了-webkit-transform: translate3d(0,0,0); 莫名其妙解决。

@binnng
Copy link
Author

binnng commented Jul 29, 2013

-webkit-perspective:1000;
-webkit-backface-visibility:hidden;

也可以

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment