<i id='cVdFJ'><tr id='cVdFJ'><dt id='cVdFJ'><q id='cVdFJ'><span id='cVdFJ'><b id='cVdFJ'><form id='cVdFJ'><ins id='cVdFJ'></ins><ul id='cVdFJ'></ul><sub id='cVdFJ'></sub></form><legend id='cVdFJ'></legend><bdo id='cVdFJ'><pre id='cVdFJ'><center id='cVdFJ'></center></pre></bdo></b><th id='cVdFJ'></th></span></q></dt></tr></i><div id='cVdFJ'><tfoot id='cVdFJ'></tfoot><dl id='cVdFJ'><fieldset id='cVdFJ'></fieldset></dl></div>
      1. <legend id='cVdFJ'><style id='cVdFJ'><dir id='cVdFJ'><q id='cVdFJ'></q></dir></style></legend>

          <bdo id='cVdFJ'></bdo><ul id='cVdFJ'></ul>
      2. <small id='cVdFJ'></small><noframes id='cVdFJ'>

        <tfoot id='cVdFJ'></tfoot>
      3. 使用 CSS 样式化 SVG 圆圈

        时间:2023-09-08
      4. <i id='hUYi8'><tr id='hUYi8'><dt id='hUYi8'><q id='hUYi8'><span id='hUYi8'><b id='hUYi8'><form id='hUYi8'><ins id='hUYi8'></ins><ul id='hUYi8'></ul><sub id='hUYi8'></sub></form><legend id='hUYi8'></legend><bdo id='hUYi8'><pre id='hUYi8'><center id='hUYi8'></center></pre></bdo></b><th id='hUYi8'></th></span></q></dt></tr></i><div id='hUYi8'><tfoot id='hUYi8'></tfoot><dl id='hUYi8'><fieldset id='hUYi8'></fieldset></dl></div>

              <tfoot id='hUYi8'></tfoot>
              <legend id='hUYi8'><style id='hUYi8'><dir id='hUYi8'><q id='hUYi8'></q></dir></style></legend>

              • <small id='hUYi8'></small><noframes id='hUYi8'>

                  <tbody id='hUYi8'></tbody>
                  <bdo id='hUYi8'></bdo><ul id='hUYi8'></ul>
                • 本文介绍了使用 CSS 样式化 SVG 圆圈的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  所以我有我的 SVG 圆.

                  So I have my SVG-circle.

                  <svg xmlns="http://www.w3.org/2000/svg" version="1.1">
                     <circle cx="168" cy="179" r="59" fill="white" />
                  </svg>
                  

                  当一个人悬停在圆圈时,我希望它是 120%.我尝试了宽度,高度和笔划.悬停时没有找到使圆圈变大的任何解决方案.有什么建议吗?

                  I want it to be 120% when one hover the circle. I tried both with width, height and stroke. Haven't find any solution to make the circle bigger when hovering. Any suggestions?

                  circle:hover
                    {
                      stroke-width:10px;
                    }
                  
                  circle:hover
                    {
                      height: 120%;
                      width: 120%;
                    }
                  

                  推荐答案

                  根据 SVG 1.1 规范,您不能使用 CSS 设置 SVG 圆圈的 r 属性的样式 https://www.w3.org/TR/SVG/styling.html#SVGStylingProperties.但你可以这样做:

                  As per the SVG 1.1 specification you can't style the r attribute of an SVG circle using CSS https://www.w3.org/TR/SVG/styling.html#SVGStylingProperties. But you can do:

                  <circle cx="168" cy="179" r="59"
                          fill="white" stroke="black"
                          onmouseover="evt.target.setAttribute('r', '72');"
                          onmouseout="evt.target.setAttribute('r', '59');"/>
                  

                  在某些现代浏览器部分支持的 SVG 2 中,您可以使用 CSS 设置圆的 r 属性样式.https://www.w3.org/TR/SVG2/styling.html#PresentationAttributes

                  In SVG 2, which is partially supported by some modern browsers, you can style the r attribute of circles using CSS. https://www.w3.org/TR/SVG2/styling.html#PresentationAttributes

                  这篇关于使用 CSS 样式化 SVG 圆圈的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何制作边缘平滑的 CSS 三角形? 下一篇:在 JavaScript 中查找多边形的中心点

                  相关文章

                  最新文章

                  <legend id='kqgQ7'><style id='kqgQ7'><dir id='kqgQ7'><q id='kqgQ7'></q></dir></style></legend>

                  <small id='kqgQ7'></small><noframes id='kqgQ7'>

                  1. <i id='kqgQ7'><tr id='kqgQ7'><dt id='kqgQ7'><q id='kqgQ7'><span id='kqgQ7'><b id='kqgQ7'><form id='kqgQ7'><ins id='kqgQ7'></ins><ul id='kqgQ7'></ul><sub id='kqgQ7'></sub></form><legend id='kqgQ7'></legend><bdo id='kqgQ7'><pre id='kqgQ7'><center id='kqgQ7'></center></pre></bdo></b><th id='kqgQ7'></th></span></q></dt></tr></i><div id='kqgQ7'><tfoot id='kqgQ7'></tfoot><dl id='kqgQ7'><fieldset id='kqgQ7'></fieldset></dl></div>

                        <bdo id='kqgQ7'></bdo><ul id='kqgQ7'></ul>
                      <tfoot id='kqgQ7'></tfoot>