SVG path inside circle

Sam

I would like to achieve the following using an inline SVG:

SVG path within circle

My rocket shape has been drawn like so:

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" class="icon">                        
    <path id="icon" d="M11.933 13.069c0 0 7.059-5.094 6.276-10.924-0.017-0.127-0.059-0.213-0.112-0.268-0.054-0.055-0.137-0.098-0.263-0.115-5.697-0.801-10.674 6.422-10.674 6.422-4.318-0.517-4.004 0.344-5.974 5.076-0.377 0.902 0.234 1.213 0.904 0.959 0.67-0.252 2.148-0.811 2.148-0.811l2.59 2.648c0 0-0.546 1.514-0.793 2.199s0.055 1.311 0.938 0.926c4.624-2.016 5.466-1.694 4.96-6.112zM12.942 7.153c-0.598-0.613-0.598-1.604 0-2.217 0.598-0.611 1.567-0.611 2.166 0s0.598 1.603 0 2.217c-0.599 0.611-1.569 0.611-2.166 0z"></path>
</svg>

What's the best way to place my path within a filled circle as illustrated in the above image?

Sam

This can be achieved with good old CSS.

.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    stroke-width: 0;
    stroke: currentColor;
    fill: #fff;
    background-color: #4c8dcb;
    border-radius: 24px;
    padding: 8px;
}
    <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" class="icon">                        
        <path id="icon" d="M11.933 13.069c0 0 7.059-5.094 6.276-10.924-0.017-0.127-0.059-0.213-0.112-0.268-0.054-0.055-0.137-0.098-0.263-0.115-5.697-0.801-10.674 6.422-10.674 6.422-4.318-0.517-4.004 0.344-5.974 5.076-0.377 0.902 0.234 1.213 0.904 0.959 0.67-0.252 2.148-0.811 2.148-0.811l2.59 2.648c0 0-0.546 1.514-0.793 2.199s0.055 1.311 0.938 0.926c4.624-2.016 5.466-1.694 4.96-6.112zM12.942 7.153c-0.598-0.613-0.598-1.604 0-2.217 0.598-0.611 1.567-0.611 2.166 0s0.598 1.603 0 2.217c-0.599 0.611-1.569 0.611-2.166 0z"></path>
    </svg>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

SVG image inside circle

From Dev

Find elements inside circle in svg

From Dev

Center Path inside SVG

From Dev

svg animating a semi-circle path

From Dev

SVG path with rounded corners as arcs of a circle

From Dev

Trying to center an svg circle inside a div

From Dev

svg draw circle with curved text inside

From Dev

How to add a link inside an svg circle

From Dev

svg draw circle with curved text inside

From Dev

How to draw a circle inside a path on canvas in Android

From Dev

Nest text inside SVG path

From Dev

Path inside svg is not rotating correctly

From Dev

Manipulate class of a <path> inside a SVG

From Dev

Path inside svg is not rotating correctly

From Dev

SVG Path : How to marker-end arrow head to circle border?

From Dev

SVG Path : How to marker-end arrow head to circle border?

From Dev

SVG curved text along a circle clip path element not displaying

From Dev

How do I perfectly center a single character inside an SVG circle?

From Dev

How can I place text inside an SVG circle with React JS?

From Dev

How to draw a number centered inside a circle with inline svg?

From Dev

How to include angular JS expressions inside an SVG circle

From Dev

Google Chart Calendar how to mark date with circle inside -svg

From Dev

Clip-path and SVG rect inside animation

From Dev

Recognize point(x,y) is inside svg path or outside

From Dev

Adjacent lines inside svg path with stroke-width

From Dev

What does the letter 'e' means inside a SVG path?

From Dev

D3JS - animate a circle along an svg path at a constant speed

From Dev

How to find nested and transformed SVG element (e.g. circle / path / ...) based on click position

From Dev

How can I display an image inside SVG circle in html5?

Related Related

  1. 1

    SVG image inside circle

  2. 2

    Find elements inside circle in svg

  3. 3

    Center Path inside SVG

  4. 4

    svg animating a semi-circle path

  5. 5

    SVG path with rounded corners as arcs of a circle

  6. 6

    Trying to center an svg circle inside a div

  7. 7

    svg draw circle with curved text inside

  8. 8

    How to add a link inside an svg circle

  9. 9

    svg draw circle with curved text inside

  10. 10

    How to draw a circle inside a path on canvas in Android

  11. 11

    Nest text inside SVG path

  12. 12

    Path inside svg is not rotating correctly

  13. 13

    Manipulate class of a <path> inside a SVG

  14. 14

    Path inside svg is not rotating correctly

  15. 15

    SVG Path : How to marker-end arrow head to circle border?

  16. 16

    SVG Path : How to marker-end arrow head to circle border?

  17. 17

    SVG curved text along a circle clip path element not displaying

  18. 18

    How do I perfectly center a single character inside an SVG circle?

  19. 19

    How can I place text inside an SVG circle with React JS?

  20. 20

    How to draw a number centered inside a circle with inline svg?

  21. 21

    How to include angular JS expressions inside an SVG circle

  22. 22

    Google Chart Calendar how to mark date with circle inside -svg

  23. 23

    Clip-path and SVG rect inside animation

  24. 24

    Recognize point(x,y) is inside svg path or outside

  25. 25

    Adjacent lines inside svg path with stroke-width

  26. 26

    What does the letter 'e' means inside a SVG path?

  27. 27

    D3JS - animate a circle along an svg path at a constant speed

  28. 28

    How to find nested and transformed SVG element (e.g. circle / path / ...) based on click position

  29. 29

    How can I display an image inside SVG circle in html5?

HotTag

Archive