How to set keyframes name in LESS
问题 I try to set up this LESS mixin for CSS animation keyframes: .keyframes(@name, @from, @to) {; @-webkit-keyframes "@name" { from { @from; } to { @to; } } } but there is some problem with name pharse, is there any option to do this corectly? 回答1: As of LESS >= 1.7 you can use variables for keyframe keywords (names). Some changes have been made in LESS 1.7 to how directives work, which allows to use variables for the name/keyword of @keyframes (so the example from the question should work now).