background preloader

Lazy Line Painter

Lazy Line Painter

SVG Path Animation with jQuery and Illustrator As technology in the web moves forward we are offered new tools to build amazing web applications. Scalable Vector Graphics or SVG’s have been gaining traction in the past year or so as most browsers handle the image file extension ‘.svg’. You can see the break down over at CanIUse.com. In this tutorial we will build a path animation using a super slick jQuery Plugin called Lazy Line Painter by Cam O’Connell. Cam is a London based front-end web developer with a passion for building interactive web applications and plugins. Here is the Demo and Source files for what we will be building. For this exercise you will need a basic understanding of HTML, CSS and jQuery. Here is Our Step by Step Approach: Set Up Our File StructureDownload & Connect Our PluginGenerate an SVG file from IllustratorDrop our image into the SVG Lazy Line ConverterCopy and Paste the Generated Code Into Our ‘main.js’ FileAdd Some CSS Step 1: Set Up Our File Structure Step 2: Download & Connect Our Plugin <p>Hello world!

Lightt Animate SVG Icons with CSS3 & jQuery November 30, 2013 | Web Development | By Joseph Howard Recently, there’s been a lot of buzz throughout the web design and development community on using SVG for icons. Due to a number of limitations and inconveniences, using raster-based images for your icons, has become an increasingly painful and restricting endevour. There are a number of reasons why a raster based image for the purposes icons, have become obsolete. Which brings us to this article. I’m assuming, if you’ve made it this far, that you have at minimal, a basic understanding of CSS, HTML, a little JavaScript and Adobe Illustrator. If you are completely unfamiliar with SVG, I would recommend reading this article on SVG basics over at CSS-Tricks prior to going any further. Let’s get started. Full Demo Download Source CSS Only Demo Project Overview In this project I will be taking an SVG icon straight from Illustrator and creating work-ready set-up that’s suitable for any project, with no external JS libraries besides jQuery. <! <!

How to Scale SVG Share this: monday.com helps you manage your projects. The following is a guest post by Amelia Bellamy-Royds. Until you open up your web page in test browsers and discover that some leave huge blocks of whitespace above and below the image, while others crop it off too short. SVG stands for Scalable Vector Graphics. #SVG is not (just) an image Part of the reason that scaling SVG is so difficult is because we have a certain idea about how images should scale, and SVG doesn't behave in the same way. Raster images like JPG, PNG, and GIF, have a clearly defined size. You can force the browser to draw a raster image at a different size than its intrinsic height and width, but if you force it to a different aspect ratio, things will get distorted. See the Pen Image Scaling Basics by Amelia Bellamy-Royds (@AmeliaBR) on CodePen. SVG images, in contrast, can be drawn at any pixel size, so they don't need a clearly defined height or width. If you don't, SVG won't scale at all. #The SVG Scaling Toolbox

Make SVG Responsive For an image format that features infinite scalability, SVG can be a surprisingly difficult format to make responsive: vector images do not adjust themselves to the size of the viewport by default. Make A Responsive SVG Image As an image, you can make a SVG vector illustration scale with the page content as you would any other: While this works in many cases, sometimes it isn’t enough, especially if you’re trying to embed the SVG illustration via an <object> tag or entering the code directly into the page. In that case, simply modifying the width and height of the element won’t work. Making Inline SVG Responsive After being pasted into the <body> of an HTML document, embedded SVG code will typically look something like this: With the <svg> root element cleaned up, the code is much more presentable: Removing most of the redundant <svg> element attributes makes the illustration responsive, but at the cost of adding space above and below the vector image.

Rendre un SVG responsif Infiniment redimensionnable, le format SVG n'en est pas moins étonnamment difficile à rendre responsif. Dudley Storey montre comment y parvenir, avec un SVG image ou en ligne. Trop fort Dudley. Par Dudley Storey Pour un format d’image infiniment redimensionnable, SVG peut être étonnament difficile à rendre responsif : les images vectorielles ne s’ajustent pas par défaut à la taille du viewport. Une image SVG responsive En tant qu’image, votre SVG peut se redimensionner avec le contenu de la page, comme tous les autres : Ça fonctionne dans la plupart des cas, mais parfois ce n’est pas suffisant, surtout si vous embarquez votre SVG via une balise <object> ou en insérant le code directement dans la page. Un SVG en ligne responsif Le code SVG embarqué, une fois collé dans le <body> d’un document HTML, ressemblera à ceci : Une fois l’élément racine <svg> nettoyé, le code est beaucoup plus présentable : Cela déplace l’illustration SVG en haut de son conteneur. Intéressé par SVG ?

Related: