Skip to content

Instantly share code, notes, and snippets.

@think2011
Last active November 13, 2016 04:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save think2011/c9cf838b08d455a5fc41c5999cea8ac4 to your computer and use it in GitHub Desktop.
Save think2011/c9cf838b08d455a5fc41c5999cea8ac4 to your computer and use it in GitHub Desktop.
css实现的tabs
[class^=scene-] {
transform: translate3d(0, 0, 0);
transition: .3s ease;
display: flex;
flex-flow: row nowrap;
@for $i from 0 through 5 {
&.scene-#{$i} {
transform: translate3d(#{-($i * 100%)}, 0, 0);
}
}
> * {
width: 100%;
flex: none;
transition: .3s;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment