CSS data types and how to traverse assignment
This article mainly explains the "CSS data types and the way of ergodic assignment". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "CSS data types and traversal assignment methods".
# number type
$width:300px;$height:200px;$zoomValue: 2bet.div {width: $width; height: $height; zoom:$zoomValue;}
# character type
# Array type ()
The subscript position starts from 1.
$list: (100pxMagol 200pxMagneto avataridPower2); .div {width: nth ($list,1); height: nth ($list,2);}
# map
$map: (top:1px,left:2px,bottom:3px,right:4px); .div {top:map_get ($map,top); left: map_get ($map,left); bottom: map_get ($map,bottom); right: map_get ($map,right);}
Ergodic assignment mode
$map: (top:1px,left:2px,bottom:3px,right:4px) .div {@ each $key,$value in $map {# {$key}: # {$value}} Thank you for reading, the above is the content of "CSS data types and the way of ergodic assignment". After the study of this article, I believe you have a deeper understanding of the CSS data type and the way of traversing assignment, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!