Style SVG circle with CSS

后端 未结 11 1614
时光取名叫无心
时光取名叫无心 2020-12-14 01:03

So I have my SVG-circle.


   
         


        
11条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-14 01:55

    This should work for you.

    jsfiddle

    You need to manipulate the radius and this can only be done via javascript:

    $(function () {
        $("svg circle").on("mouseenter", function () {
    
            var oldR = $(this).attr("r");
    
            var newR = (((oldR*2)/100)*120)/2; // 120% width
    
            $(this).attr("r", newR);
    
        });
    });
    

提交回复
热议问题