我想我現(xiàn)在的工作中有一個(gè)非常特殊的案例。即時(shí)通訊開(kāi)發(fā)用戶界面,允許創(chuàng)建和定制一些像進(jìn)度條等部件。大部分都是SVG??蛻粝M麍D標(biāo)是可定制的,所以每個(gè)人都可以在其中插入隨機(jī)的svg。 下面是svg的代碼:
<svg
preserveAspectRatio="none"
width="100%"
data-value="${value}"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 463 47"
>
<g
id="1"
data-name="Group 34"
transform="translate(-54 -2059)"
style="stroke: rgb(0, 0, 255); fill: rgb(50, 50, 255)"
>
<g
id="Ellipse_103"
data-name="Ellipse 103"
transform="translate(116 2059)"
fill="#fff"
stroke-width="2"
style="fill: none"
>
<circle cx="23.5" cy="23.5" r="23.5" stroke="none"></circle>
<circle cx="23.5" cy="23.5" r="22.5" fill="none"></circle>
</g>
<path
id="Icon_ionic-md-checkmark-circle"
data-name="Icon ionic-md-checkmark-circle"
d="M18,3.375A14.625,14.625,0,1,0,32.625,18,14.668,14.668,0,0,0,18,3.375ZM15,25.8,7.5,18.3l2.1-2.1L15,21.6,26.4,10.2l2.1,2.1Z"
fill="#0000FF"
transform="translate(121.5 2064.5)"
></path>
</g>
<g
id="2"
data-name="Group 35"
transform="translate(-57 -2059)"
style="stroke: rgb(0, 0, 255)"
>
<g
id="Ellipse_104"
data-name="Ellipse 104"
fill="#fff"
stroke-width="2"
transform="translate(265 2059)"
style="fill: none"
>
<circle cx="23.5" cy="23.5" r="23.5" stroke="none"></circle>
<circle cx="23.5" cy="23.5" r="22.5" fill="none"></circle>
</g>
<path
id="Icon_ionic-ios-unlock"
data-name="Icon ionic-ios-unlock"
d="M26.438,13.5H13.219V10.125a4.781,4.781,0,0,1,9.563,0h0a.984.984,0,0,0,1.969,0h0a6.75,6.75,0,1,0-13.5.091V13.5H9.563A2.821,2.821,0,0,0,6.75,16.313v13.5a2.821,2.821,0,0,0,2.813,2.813H26.438a2.821,2.821,0,0,0,2.813-2.812v-13.5A2.821,2.821,0,0,0,26.438,13.5Zm-7.453,8.775v4.837a1.008,1.008,0,0,1-.935,1.013.986.986,0,0,1-1.034-.984V22.275a2.25,2.25,0,1,1,1.969,0Z"
fill="#0000FF"
transform="translate(270 2064.5)"
></path>
</g>
<g
id="3"
data-name="Group 36"
transform="translate(-48 -2059)"
style="stroke: rgb(0, 0, 255)"
>
<g
id="Ellipse_105"
data-name="Ellipse 105"
transform="translate(402 2059)"
fill="#fff"
stroke-width="2"
style="fill: none"
>
<circle cx="23.5" cy="23.5" r="23.5" stroke="none"></circle>
<circle cx="23.5" cy="23.5" r="22.5" fill="none"></circle>
</g>
<path
id="Icon_ionic-ios-lock"
data-name="Icon ionic-ios-lock"
d="M26.438,13.5H24.75V10.216a6.75,6.75,0,1,0-13.5-.091V13.5H9.563A2.821,2.821,0,0,0,6.75,16.313v13.5a2.821,2.821,0,0,0,2.813,2.813H26.438a2.821,2.821,0,0,0,2.813-2.812v-13.5A2.821,2.821,0,0,0,26.438,13.5Zm-7.453,8.775v4.837a1.008,1.008,0,0,1-.935,1.013.986.986,0,0,1-1.034-.984V22.275a2.25,2.25,0,1,1,1.969,0Zm3.8-8.775H13.219V10.125a4.781,4.781,0,0,1,9.563,0Z"
fill="#0000FF"
transform="translate(407.5 2064.5)"
></path>
</g>
<g
id="Ellipse_114"
data-name="Ellipse 3"
transform="translate(115 11)"
fill="rgba(39,172,255,0.5)"
stroke-width="1"
style="fill: rgb(50, 50, 255); stroke: rgb(0, 0, 255)"
>
<circle cx="12.5" cy="12.5" r="12.5" stroke="none"></circle>
<circle cx="12.5" cy="12.5" r="12" fill="none"></circle>
</g>
<g
id="Ellipse_115"
data-name="Ellipse 4"
transform="translate(146 11)"
fill="rgba(39,172,255,0.5)"
stroke-width="1"
style="fill: rgb(50, 50, 255); stroke: rgb(0, 0, 255)"
>
<circle cx="12.5" cy="12.5" r="12.5" stroke="none"></circle>
<circle cx="12.5" cy="12.5" r="12" fill="none"></circle>
</g>
<g
id="Ellipse_116"
data-name="Ellipse 5"
transform="translate(177 11)"
fill="rgba(39,172,255,0.5)"
stroke-width="1"
style="fill: rgb(50, 50, 255); stroke: rgb(0, 0, 255)"
>
<circle cx="12.5" cy="12.5" r="12.5" stroke="none"></circle>
<circle cx="12.5" cy="12.5" r="12" fill="none"></circle>
</g>
<g
id="Ellipse_117"
data-name="Ellipse 2"
transform="translate(31 11)"
fill="rgba(39,172,255,0.5)"
stroke-width="1"
style="fill: rgb(50, 50, 255); stroke: rgb(0, 0, 255)"
>
<circle cx="12.5" cy="12.5" r="12.5" stroke="none"></circle>
<circle cx="12.5" cy="12.5" r="12" fill="none"></circle>
</g>
<g
id="Ellipse_118"
data-name="Ellipse 1"
transform="translate(0 11)"
fill="rgba(39,172,255,0.5)"
stroke-width="1"
style="fill: rgb(50, 50, 255); stroke: rgb(0, 0, 255)"
>
<circle cx="12.5" cy="12.5" r="12.5" stroke="none"></circle>
<circle cx="12.5" cy="12.5" r="12" fill="none"></circle>
</g>
<g
id="Ellipse_119"
data-name="Ellipse 6"
transform="translate(261 11)"
fill="#fff"
stroke-width="1"
style="fill: none; stroke: rgb(0, 0, 255)"
>
<circle cx="12.5" cy="12.5" r="12.5" stroke="none"></circle>
<circle cx="12.5" cy="12.5" r="12" fill="none"></circle>
</g>
<g
id="Ellipse_120"
data-name="Ellipse 7"
transform="translate(292 11)"
fill="#fff"
stroke-width="1"
style="fill: none; stroke: rgb(0, 0, 255)"
>
<circle cx="12.5" cy="12.5" r="12.5" stroke="none"></circle>
<circle cx="12.5" cy="12.5" r="12" fill="none"></circle>
</g>
<g
id="Ellipse_121"
data-name="Ellipse 8"
transform="translate(323 11)"
fill="#fff"
stroke-width="1"
style="fill: none; stroke: rgb(0, 0, 255)"
>
<circle cx="12.5" cy="12.5" r="12.5" stroke="none"></circle>
<circle cx="12.5" cy="12.5" r="12" fill="none"></circle>
</g>
<g
id="Ellipse_123"
data-name="Ellipse 10"
transform="translate(438 11)"
fill="#fff"
stroke-width="1"
style="fill: none; stroke: rgb(0, 0, 255)"
>
<circle cx="12.5" cy="12.5" r="12.5" stroke="none"></circle>
<circle cx="12.5" cy="12.5" r="12" fill="none"></circle>
</g>
<g
id="Ellipse_122"
data-name="Ellipse 9"
transform="translate(407 11)"
fill="#fff"
stroke-width="1"
style="fill: none; stroke: rgb(0, 0, 255)"
>
<circle cx="12.5" cy="12.5" r="12.5" stroke="none"></circle>
<circle cx="12.5" cy="12.5" r="12" fill="none"></circle>
</g>
</svg>