Last active
August 29, 2015 14:07
-
-
Save teamrun/66c41942ca095e42c067 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // mixin | |
| .tst(@v:all 300ms ease;){ | |
| -webkit-transition: @v; | |
| -moz-transition: @v; | |
| transition: @v; | |
| } | |
| // use | |
| .modal{ | |
| // 最末尾的分号会让less知道前面这些是作为*一个*参数传进去的 | |
| .tst(opacity 300ms ease, height 0ms ease 300ms, z-index 0ms ease 300ms;); | |
| } | |
| // 在了解这一点之前, 用过的笨方法 | |
| // mixin重载... | |
| // 接收不同数量参数的重载... | |
| .tst(@v){ | |
| -webkit-transition: @v; | |
| -moz-transition: @v; | |
| transition: @v; | |
| } | |
| .tst(@v1, @v2){ | |
| -webkit-transition: @v1, @v2; | |
| -moz-transition: @v1, @v2; | |
| transition: @v1, @v2; | |
| } | |
| .tst(@v1, @v2, @v3){ | |
| -webkit-transition: @v1, @v2, @v3; | |
| -moz-transition: @v1, @v2, @v3; | |
| transition: @v1, @v2, @v3; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment