HTML5技术

svg实现放大效果 - 师妹儿

字号+ 作者:H5之家 来源:H5之家 2017-06-30 18:00 我要评论( )

svg实现放大效果 svg实现放大效果在ai上写几个字例如: svg代码:#XMLID_57_{animation:zizou 3s;}@keyframes zizou{from{transform:scale(1.0);}to{transform:scale(1.2);}}#XMLID_65_{animation:zizou 3s;}@keyframes zizou{from{transform:scale(1.0);}to

svg实现放大效果

svg实现放大效果 在ai上写几个字 例如:

svg代码: #XMLID_57_{ animation:zizou 3s; } @keyframes zizou{ from{ transform:scale(1.0); } to{ transform:scale(1.2); } } #XMLID_65_{ animation:zizou 3s; } @keyframes zizou{ from{ transform:scale(1.0); } to{ transform:scale(1.2); } } #XMLID_68_{ animation:zizou 3s; } @keyframes zizou{ from{ transform:scale(1.0); } to{ transform:scale(1.2); } } 完整代码 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <style> svg{ width: 400px; height: 200px; border: 1px solid #ccc; display: block; margin: 0 auto; } #XMLID_57_{ animation:zizou 3s; } @keyframes zizou{ from{ transform:scale(1.0); } to{ transform:scale(1.2); } } #XMLID_65_{ animation:zizou 3s; } @keyframes zizou{ from{ transform:scale(1.0); } to{ transform:scale(1.2); } } #XMLID_68_{ animation:zizou 3s; } @keyframes zizou{ from{ transform:scale(1.0); } to{ transform:scale(1.2); } } </style> </head> <body> <?xml version="1.0" encoding="utf-8"?> <!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 200 100" xml:space="preserve"> <style type="text/css"> .st0{fill:#94EDFF;} </style> <g> <path d="M42.5,31.2H44l1.5,1.5c-1,2-2.5,3-4.5,3c0,1.6,1.7,4.1,5.3,7.5c-0.5,14-1.8,21-3.8,21h-2.3l-7.5-3 c-4.4,0.5-7.1,1.2-8.3,2.3l-0.8-0.8V62C26.3,52.1,30,44.1,35,38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,7.9h-1.7l-0.9-0.9h-0.8c0,1.8-0.6,2.6-1.7,2.6l-1.9-2.6V49h-1.7c-3.5,0-6.9,6.1-10.3,18.4l-0.9,0.9h-2.6l-1.7-1.9 c1.9-14.6,3.3-21.9,4.3-21.9h0.9l5.1,4.5h1.9l1.7-1.9c-3.5-3.6-5.3-8.3-5.3-14.1L83.8,34h-3.6l-3.4-1.7v-1.9 C76.9,29.2,80.9,27.5,88.9,25.2z M96.7,44.5v0.9l0.8,6.2l6.9-6.2v-0.9l-5.1,0.9L96.7,44.5z"/> <path d="M158.8,22.2l0.8,0.8v0.8l-2.3,4.5v7.5l6.8-1.5l3,3.8c0,9-3.5,13.5-10.5,13.5v0.8l0.8,12 c-0.8,2.5-2.5,3.8-5.3,3.8c-1.5-3.4-2.3-6.9-2.3-10.5v-6.8c-1-1.1-1.5-2.9-1.5-5.3h-0.8l-6,3.8h-0.8l-1.5-1.5c0-1.6,4-7.1,12-16.5 l0.8-0.8V29h-1.5c-7,0-11.8,5.3-14.3,15.8l-2.3,6l0.8,0.8v0.8c-0.6,4-1.6,6-3,6H131c-0.8,0-1.5-1-2.3-3c1-8.3,2.5-15.5,4.5-21.8 c-1.3,0.4-3.3,4.1-6,11.3c-0.6,0-1.1,2.3-1.5,6.8l-5.3,5.3l-2.3-3.8v-3l4.5-12v-3l-1.5-2.3l2.3-2.3h3l4.5,3.8 c3.2-7.5,6.2-11.3,9-11.3l0.8,0.8v1.5c-3,5.4-4.5,9.1-4.5,11.3c5-7,11.3-11.5,18.8-13.5L158.8,22.2z M157.3,39.5l-0.8,7.5v1.5h1.5 c2.5-1.2,3.8-3.2,3.8-6v-3H157.3z"/> </g> <ellipse cx="12.5" cy="52.2" rx="2.5" ry="7.2"/> <ellipse transform="matrix(0.866 -0.5 0.5 0.866 -24.4087 13.239)" cx="12.5" cy="52.2" rx="2.5" ry="7.2"/> <ellipse transform="matrix(0.5 -0.866 0.866 0.5 -38.9277 36.9086)" cx="12.5" cy="52.2" rx="2.5" ry="7.2"/> <ellipse cx="12.5" cy="52.2" rx="7.2" ry="2.5"/> <ellipse transform="matrix(-0.5 -0.866 0.866 -0.5 -26.4277 89.0753)" cx="12.5" cy="52.2" rx="2.5" ry="7.2"/> <ellipse transform="matrix(-0.8589 -0.5122 0.5122 -0.8589 -3.4851 103.373)" cx="12.5" cy="52.2" rx="2.5" ry="7.2"/> <ellipse cx="24.5" cy="84.2" rx="2.5" ry="7.2"/> <ellipse transform="matrix(0.866 -0.5 0.5 0.866 -38.801 23.5262)" cx="24.5" cy="84.2" rx="2.5" ry="7.2"/> <ellipse transform="matrix(0.5 -0.866 0.866 0.5 -60.6405 63.301)" cx="24.5" cy="84.2" rx="2.5" ry="7.2"/> <ellipse cx="24.5" cy="84.2" rx="7.2" ry="2.5"/> <ellipse transform="matrix(-0.5 -0.866 0.866 -0.5 -36.1405 147.4676)" cx="24.5" cy="84.2" rx="2.5" ry="7.2"/> <ellipse transform="matrix(-0.8589 -0.5122 0.5122 -0.8589 2.4301 169.003)" cx="24.5" cy="84.2" rx="2.5" ry="7.2"/> <ellipse cx="74.5" cy="84.2" rx="2.5" ry="7.2"/> <ellipse transform="matrix(0.866 -0.5 0.5 0.866 -32.1022 48.5262)" cx="74.5" cy="84.2" rx="2.5" ry="7.2"/> <ellipse transform="matrix(0.5 -0.866 0.866 0.5 -35.6405 106.6022)" cx="74.5" cy="84.2" rx="2.5" ry="7.2"/> <ellipse cx="74.5" cy="84.2" rx="7.2" ry="2.5"/> <ellipse transform="matrix(-0.5 -0.866 0.866 -0.5 38.8595 190.7689)" cx="74.5" cy="84.2" rx="2.5" ry="7.2"/> <ellipse transform="matrix(-0.8589 -0.5122 0.5122 -0.8589 95.3729 194.614)" cx="74.5" cy="84.2" rx="2.5" ry="7.2"/> <ellipse cx="124.5" cy="84.2" rx="2.5" ry="7.2"/> <ellipse transform="matrix(0.866 -0.5 0.5 0.866 -25.4035 73.5262)" cx="124.5" cy="84.2" rx="2.5" ry="7.2"/> <ellipse transform="matrix(0.5 -0.866 0.866 0.5 -10.6405 149.9035)" cx="124.5" cy="84.2" rx="2.5" ry="7.2"/> <ellipse cx="124.5" cy="84.2" rx="7.2" ry="2.5"/> <ellipse transform="matrix(-0.5 -0.866 0.866 -0.5 113.8595 234.0702)" cx="124.5" cy="84.2" rx="2.5" ry="7.2"/> <ellipse transform="matrix(-0.8589 -0.5122 0.5122 -0.8589 188.3156 220.2249)" cx="124.5" cy="84.2" rx="2.5" ry="7.2"/> <ellipse cx="181.5" cy="84.2" rx="2.5" ry="7.2"/> <ellipse transform="matrix(0.866 -0.5 0.5 0.866 -17.7669 102.0262)" cx="181.5" cy="84.2" rx="2.5" ry="7.2"/> <ellipse transform="matrix(0.5 -0.866 0.866 0.5 17.8595 199.2669)" cx="181.5" cy="84.2" rx="2.5" ry="7.2"/> <ellipse cx="181.5" cy="84.2" rx="7.2" ry="2.5"/> <ellipse transform="matrix(-0.5 -0.866 0.866 -0.5 199.3595 283.4336)" cx="181.5" cy="84.2" rx="2.5" ry="7.2"/> <ellipse transform="matrix(-0.8589 -0.5122 0.5122 -0.8589 294.2703 249.4214)" cx="181.5" cy="84.2" rx="2.5" ry="7.2"/> <ellipse cx="18.5" cy="17.2" rx="2.5" ry="7.2"/> <ellipse transform="matrix(0.866 -0.5 0.5 0.866 -6.1048 11.5499)" cx="18.5" cy="17.2" rx="2.5" ry="7.2"/> <ellipse transform="matrix(0.5 -0.866 0.866 0.5 -5.6168 24.6048)" cx="18.5" cy="17.2" rx="2.5" ry="7.2"/> <ellipse cx="18.5" cy="17.2" rx="7.2" ry="2.5"/> <ellipse transform="matrix(-0.5 -0.866 0.866 -0.5 12.8832 41.7715)" cx="18.5" cy="17.2" rx="2.5" ry="7.2"/> <ellipse transform="matrix(-0.8589 -0.5122 0.5122 -0.8589 25.5957 41.3864)" cx="18.5" cy="17.2" rx="2.5" ry="7.2"/> <ellipse cx="68.5" cy="15.2" rx="2.5" ry="7.2"/> <ellipse transform="matrix(0.866 -0.5 0.5 0.866 1.5939 36.2819)" cx="68.5" cy="15.2" rx="2.5" ry="7.2"/> <ellipse transform="matrix(0.5 -0.866 0.866 0.5 21.1153 66.9061)" cx="68.5" cy="15.2" rx="2.5" ry="7.2"/> <ellipse cx="68.5" cy="15.2" rx="7.2" ry="2.5"/> <ellipse transform="matrix(-0.5 -0.866 0.866 -0.5 89.6153 82.0727)" cx="68.5" cy="15.2" rx="2.5" ry="7.2"/> <ellipse transform="matrix(-0.8589 -0.5122 0.5122 -0.8589 119.5629 63.2797)" cx="68.5" cy="15.2" rx="2.5" ry="7.2"/> <ellipse cx="118.5" cy="15.2" rx="2.5" ry="7.2"/> <ellipse transform="matrix(0.866 -0.5 0.5 0.866 8.2927 61.2819)" cx="118.5" cy="15.2" rx="2.5" ry="7.2"/> <ellipse transform="matrix(0.5 -0.866 0.866 0.5 46.1153 110.2073)" cx="118.5" cy="15.2" rx="2.5" ry="7.2"/> <ellipse cx="118.5" cy="15.2" rx="7.2" ry="2.5"/> <ellipse transform="matrix(-0.5 -0.866 0.866 -0.5 164.6153 125.374)" cx="118.5" cy="15.2" rx="2.5" ry="7.2"/> <ellipse transform="matrix(-0.8589 -0.5122 0.5122 -0.8589 212.5056 88.8906)" cx="118.5" cy="15.2" rx="2.5" ry="7.2"/> <ellipse cx="168.5" cy="15.2" rx="2.5" ry="7.2"/> <ellipse transform="matrix(0.866 -0.5 0.5 0.866 14.9914 86.2819)" cx="168.5" cy="15.2" rx="2.5" ry="7.2"/> <ellipse transform="matrix(0.5 -0.866 0.866 0.5 71.1153 153.5086)" cx="168.5" cy="15.2" rx="2.5" ry="7.2"/> <ellipse cx="168.5" cy="15.2" rx="7.2" ry="2.5"/> <ellipse transform="matrix(-0.5 -0.866 0.866 -0.5 239.6153 168.6753)" cx="168.5" cy="15.2" rx="2.5" ry="7.2"/> <ellipse transform="matrix(-0.8589 -0.5122 0.5122 -0.8589 305.4483 114.5016)" cx="168.5" cy="15.2" rx="2.5" ry="7.2"> </svg> </body> </html> 效果图如下:

posted @

 

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

相关文章
  • svg实现简单沙漏旋转 - 师妹儿

    svg实现简单沙漏旋转 - 师妹儿

    2017-07-01 08:00

  • 利用单片机快速实现家庭智能控制平台 - 小五义

    利用单片机快速实现家庭智能控制平台 - 小五义

    2017-06-29 18:00

  • css3实现可以计算的自适应布局——calc() - WEB大白

    css3实现可以计算的自适应布局——calc() - WEB大白

    2017-06-29 11:01

  • 神奇的深度图:复杂的效果,不复杂的原理 - 慕容小匹夫

    神奇的深度图:复杂的效果,不复杂的原理 - 慕容小匹夫

    2017-06-28 14:03

网友点评