Development – Leet 4 Life

Software Development Code Samples and More

Skip to: Content | Sidebar | Footer

Tag: Image

HTML5 Canvas and ASP.NET Image Control

5 December, 2012 | ASP.NET, HTML5 | By: Michael Adams

I was playing with the HTML5 Canvas element trying to allow client side zooming/panning/rotating of an image. I finally figured out an implementation that will accommodate the zooming and I am still working on the panning/rotating pieces of the functionality. I use a SELECT element to act as the scale (Zoom) for the image. Even though it is not present in the code snippet below, I use a Generic Handler to populate my ASP.NET Image control. The HTML5 canvas uses the ASP.NET Image control as the source of the image and then I can use JavaScript and the Canvas element [Read More…]

Background Image Stretch With CSS

7 November, 2012 | CSS | By: Michael Adams

I was creating a UI from a PSD file and after I extracted the image background I realized that it was only 970px wide. So I went searching for a good way to stretch it out in the background and I ran across this gem. This HTML code combined with CSS will allow you to stretch an image of any size to fill in the entire space you need it to be the background for. In the example below this would go in the just inside of the body tag and would stretch over the entire background of the page. [Read More…]