stylus写法,你可以参考一下方法一: test($width) width: $width height: $width background: red @media screen and (max-width: 600px) $width = 100px .one-class test($width) @media (max-width: 2000px) and (min-width: 600px) $width = 200px .one-class test($width) 方法二: $width = { small: 100px, medium: 200px, large: 300px } test($width) width: $width height: $width background: red @media screen and (max-width: 600px) .one-class test($width.small) @media (max-width: 2000px) and (min-width: 600px) .one-class test($width.large)
stylus写法,你可以参考一下
方法一:
方法二: