导航菜单
首页 >  images/logo-w-cn.svg  > SVG Image

SVG Image

SVG❮ Previous Next ❯SVG Image -

The element is used to insert an image in SVG.

SVG software must support JPEG, PNG, and other SVG files.

The element has some basic attributes to position and shape the image:

AttributeDescriptionwidthRequired. The width of the imageheightRequired. The height of the imagehrefRequired. The URL of the imagexThe x-position for the top-left corner of the imageyThe y-position for the top-left corner of the imageInsert an Image

Here we insert a .jpg image inside SVG:

Sorry, your browser does not support inline SVG.

Here is the SVG code:

Example  Try it Yourself »

Code explanation:

The height attribute defines the height of the image The width attribute defines thewidth of the image The href attribute defines the URL of theimageAdd Some Graphic

Here we show the image on top of a blue circle, and add a text under the image:

Pulpit Rock, Norway Sorry, your browser does not support inline SVG.

Here is the SVG code:

Example      Pulpit Rock, Norway Try it Yourself » ❮ Previous Next ❯★ +1  W3schools PathfinderTrack your progress - it's free! Log in Sign Up

相关推荐: