查漏补缺——说说以下代码什么含义?
作者:互联网
问题
如题所示,相关源码如下:
// style.less
@fish-sm:2vmin;
@fish-md:3vmin;
@fish-lg:5vmin;
答案
根据上面,@符号后面是在设置变量,分别设置三个变量fish-sm
、fish-md
、fish-lg
,但是用在哪里呢?在同个文件下,但是没有看到这个用在哪里?然后就用VScode的搜索功能,得出下面的结果:
{
"icon_id": "10678177",
"name": "fish-li",
"font_class": "fish-li",
"unicode": "e903",
"unicode_decimal": 59651
},
{
"icon_id": "10678177",
"name": "fish-li",
"font_class": "fish-li",
"unicode": "e903",
"unicode_decimal": 59651
},
<glyph glyph-name="fish-li" unicode="" d="M726.89954 736c-199.92 0-374.54-120.5-471.72-223.58l-194.08 145.32c-7.3 5.46-15.56 7.88-23.6 7.88-21.7 0-41.74-17.56-36.72-40.12L54.55954 384 0.79954 142.52c-5.02-22.56 15.04-40.12 36.72-40.12 8.04 0 16.3 2.42 23.6 7.88l194.08 145.32C352.35954 152.5 526.97954 32 726.89954 32 1032.37954 32 1280.01954 313.6 1280.01954 384c0 70.4-247.64 352-553.12 352z m0-640c-172.04 0-332.42 105.12-425.14 203.48l-39.2 41.58-45.74-34.24-136.66-102.34 36.86 165.6 3.1 13.9-3.1 13.9-36.86 165.6 136.66-102.34 45.74-34.24 39.2 41.58C394.47954 566.88 554.85954 672 726.89954 672 978.01954 672 1191.73954 449.34 1215.01954 384 1191.73954 318.66 978.01954 96 726.89954 96zM896.01954 432c-26.5 0-48-21.48-48-48 0-26.5 21.5-48 48-48s48 21.5 48 48c0 26.52-21.5 48-48 48z" horiz-adv-x="1280" />
应该是用在这些地方,目前知道在less中使用@
符号设置变量就行了。
标签:查漏,变量,decimal,less,含义,li,unicode,补缺,fish 来源: https://www.cnblogs.com/Huang-zihan/p/16444463.html