计算Less中两个值的最小值/最大值 [英] Calculate min / max of two values in Less

查看:248
本文介绍了计算Less中两个值的最小值/最大值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何在Less中获得两个值的最大值或最小值.就像javascript中的Math.min()或Math.max()一样.我认为在您的mixins中使用它会很有用.

How do i get the maximum or minimum of two values in Less. Just like Math.min() or Math.max() in javascript. I think this will be useful to use in your mixins.

推荐答案

此功能已在同时实现.看看官方的功能参考:

This feature has been implemented in the meantime. Have a look at the official Function Reference:

  • min()
  • max()

这篇关于计算Less中两个值的最小值/最大值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆