参数$ map of map($ map,$ key)必须是地图

时间:2016-12-25 20:14:09

标签: css sass

$width: (camera: 1842, tv: 2066, lamp: 1050, phone: 1173, full: 3521);
$height: (camera: 1149, tv: 1488, lamp: 1107, phone: 1196, full: 2484);
$size: map-get($width, full) / map-get($height, full); // no error

@function get-width($width) {
   @return #{$width * 100 / map-get($width, full)}vw; // error
}

此代码给出错误:$map的参数map-get($map, $key)必须是地图

0 个答案:

没有答案