Popular JavaScript recipes tagged "image"http://code.activestate.com/recipes/langs/javascript/tags/image/2012-12-28T01:01:09-08:00ActiveState Code RecipesAuto Insert CSS Image Width/Height Macro: (JavaScript) 2011-11-16T15:23:03-08:00Skye Giordanohttp://code.activestate.com/recipes/users/4179718/http://code.activestate.com/recipes/577948-auto-insert-css-image-widthheight-macro/ <p style="color: grey"> JavaScript recipe 577948 by <a href="/recipes/users/4179718/">Skye Giordano</a> (<a href="/recipes/tags/css/">css</a>, <a href="/recipes/tags/height/">height</a>, <a href="/recipes/tags/image/">image</a>, <a href="/recipes/tags/width/">width</a>). </p> <p>Based on the macro at <a href="http://community.activestate.com/forum/html-editing-img-tag-expansion-etc" rel="nofollow">http://community.activestate.com/forum/html-editing-img-tag-expansion-etc</a> I hacked together this alternate version that will auto insert the width: and height: of an image background in a CSS rule turning this:</p> <p>background: url(http://server.com/myImg.jpg) 0 0 no-repeat;</p> <p>...into this:</p> <p>background: url(http://server.com/myImg.jpg) 0 0 no-repeat; height: 252px; width: 200px;</p> Sierpinski Triangle Fractal using HTML5 Canvas (JavaScript) 2010-07-07T15:07:30-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577294-sierpinski-triangle-fractal-using-html5-canvas/ <p style="color: grey"> JavaScript recipe 577294 by <a href="/recipes/users/4172570/">FB36</a> (<a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/image/">image</a>, <a href="/recipes/tags/math/">math</a>). </p> <p>Sierpinski Triangle Fractal using Line Automaton (1D CA). The 1D CA rule used is actually Pascal's Triangle Mod 2. Tested only using Firefox 3.5.</p> Mandelbrot Fractal using HTML5 Canvas (JavaScript) 2012-12-28T01:01:09-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577277-mandelbrot-fractal-using-html5-canvas/ <p style="color: grey"> JavaScript recipe 577277 by <a href="/recipes/users/4172570/">FB36</a> (<a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/image/">image</a>, <a href="/recipes/tags/math/">math</a>). Revision 3. </p> <p>Mandelbrot Fractal using HTML5 Canvas. (Do not forget to change file extension to HTML after downloading it.)</p>