Better CSS Sprites with SVG - Bessere CSS Sprites mit SVG | eleqtriq. For webdesigners it's still frustrating to deal with the limitations of the CSS "background-image" property. Sure, things have improved ten times with CSS3. We now are able to add multiple backgrounds, have a decent control of sizing and some clipping features. But where is "background-rotation"?
Why isn't there a "background-opacity" or a "background-padding" attribute? So in the end we often find ourselves creating another version of a bitmap if we want to rotate it or need some more padding, feeling guilty because we know that this will cause more traffic and additional http-requests. I have good news for you: there actually exists a ridiculously easy method to have all this additional attributes and it is supported in every modern browser.
Using SVG sprites offers a lot of benefits over conventional sprites. Some Demos Demos open in new window. Caveats Linking to an SVG which in return links to a bitmap means more http requests and as we all have learned, this is a BAD thing. Trackback. Off Canvas. Inspired by the observations of Luke Wroblewski, this Off Canvas layout demo has 3 panels that display differently depending on the viewport width.
The idea here is to have the two supporting panels of navigation and sidebar content hidden just off-screen to the left and right for easy access on small/medium viewports. Off Canvas is a design pattern, not a plugin or framework. Off Canvas Layouts CSS - Foundation 3 - ZURB Playground - ZURB.com. Off Canvas What Now? If you've used Facebook's iPhone app (or Path, or any number of apps that now follow this convention) then you've seen an off canvas panel in a native app.
You hit a button and a panel slides in from the left (or depending on how you look at it, the main panel slides out of the way). Luke Wroblewski, author of Mobile First, mentioned this style of layout in his roundup of mobile layout patterns. He and Jason Weaver then worked to create a batch of layouts, which they published to demonstrate how layouts like this could work on the Web. Four Layouts, No Waiting We've put together four different layouts, each with specific functionality and code for you to check out and download.
Bottom Nav Layout This layout moves the nav menu to the bottom on mobile, and enables a sliding sidebar. Sidebar on Mobile Only This layout moves the navigation to the sidebar on mobile only. How to Use These Layouts Foundation 3.2, the release version of Foundation 3. Repurpose, Rebuild, Reuse. Mobile HTML5 - compatibility on iPhone, Android, Windows Phone, BlackBerry, Symbian and other mobile and tablet devices. Dev Rocket - Photoshop panel plugin for iOS developers. Foundation: The Most Advanced Responsive Front-end Framework from ZURB. Twitter Bootstrap compatibility · 1d5daef · madrobby/zepto. h5bp/node-build-script. Forge Documentation — Forge - Cross-platform App Development Tools. Log In Docs home Quickstart Questions?
: Ask them on StackOverflow or email us. 1. 2. 3. Sign Up Modules summary - see all Modules allow you to drop in the native features to your Forge app that you want. Tutoriel html5 History - Creamama, developpeur web, Spip, JQuery à Grenoble. Dgileadi/zepto-page-transitions. Off Canvas Multi-Device Layouts. Most multi-device layout patterns for the Web are designed to rearrange page elements within a visible browser window. Off canvas multi-device layouts, on the other hand, use the space outside a browser’s viewport to hide secondary elements until people need them. Jason Weaver and I put together demonstrations of several new off canvas layout patterns. Why Off Canvas Layouts? In my survey of multi-device layouts patterns, I found several common ways to adapt Web page designs to a variety of screen sizes.
Since many multi-device layout patterns are only considering the visible browser window as their canvas, this situation is pretty much inevitable. Off canvas layouts do just that. Footer Nav & Off Canvas Column On large screens, this pattern looks like a pretty typical Web page layout: primary navigation on top, a left-hand column with some supporting information, and a main content area in the middle. Check out the Footer Nav & Off Canvas Column demo and in action on this site. Retina.js | Retina graphics for your website. How it works When your users load a page, retina.js checks each image on the page to see if there is a high-resolution version of that image on your server. If a high-resolution variant exists, the script will swap in that image in-place. The script assumes you use Apple's prescribed high-resolution modifier (@2x) to denote high-resolution image variants on your server.
For example, if you have an image on your page that looks like this: <img src="/images/my_image.png" /> The script will check your server to see if an alternative image exists at this path: "/images/my_image@2x.png" How to use JavaScript The JavaScript helper script automatically replaces images on your page with high-resolution variants (if they exist). Place the retina.js file on your server Include the script on your page <script type="text/javascript" src="/scripts/retina.js"></script> (put it at the bottom of your template, before your closing </body> tag) That's it! Steps: Download Download zip Download source Contribute. Le format JSON, AJAX et jQuery. JSON (JavaScript Object Notation) est une forme d'écriture de données en JavaScript. Son avantage est de fournir un support pour une écriture simple et légère au format texte, relativement compréhensible par les développeurs JavaScript, mais aussi - et surtout - d'être nativement interprété contrairement au XML qui fait appel à de l'analyse syntaxique et parfois à DOM/XSLT pour accéder à sa structure et à son contenu.
Il s'agit donc d'une arborescence de données, inspirée de XML mais dont l'emploi en JavaScript est plus aisé et plus performant, à partir du moment où on en connaît la structure. On retrouve des facilités d'utilisation de JSON dans des frameworks tels que jQuery avec des fonctions d'aide à la création d'appels AJAX (surtout $.getJSON) pour lequel JSON est bien adapté. Néanmoins, il existe d'autres implémentations dans une multitude d'autres langages pour se servir de JSON, il n'est pas limité à JavaScript : consultez une liste sur json.org. Principe "clef" : "valeur" <? Meet Bower: A Package Manager For The Web. As the web platform has matured, the tools for managing our projects, too, have matured.
In this tutorial, I’ll introduce you to one of these tools that makes managing the dependencies of your project considerably easier: Bower. When I first looked into Bower, I wasn’t exactly sure how it fit in: it wasn’t just a JavaScript package manager, like Jam, and it wasn’t a module loader, like RequireJS. It calls itself a browser package manager, but what exactly does this mean? How’s that different from a JavaScript package manager? The main difference is that Bower doesn’t just handle JavaScript libraries: it will manage any packages, even if that means HTML, CSS, or images.
Bower is just a package manager. The important thing to note here is that Bower is just a package manager, and nothing else. Enough chat: let’s see how this thing works! Installing Bower Of course, before we can actually use Bower, we’ll have to install it. Finding Packages Installing Packages Using Packages Building Packages. Schepp/CSS-JS-Booster. Mobile Web Apps: Loading PagesBuildMobile. Best Practices for a Faster Web App with HTML5. While good, this article only tells part of the performance story. View html5rocks.com/features/performance for the whole picture of performance improvements.
Introduction Much of HTML5 aims to deliver native browser support for components and techniques that we have achieved through JavaScript libraries thus far. Using these features, when present, can end up delivering a much faster experience for your users. In this tutorial, I won't recap the excellent performance research that you've seen at Yahoo's Exceptional Performance site or Google's Page Speed docs and Let's make the web faster site. Instead I'll focus on how putting HTML5 and CSS3 to use today can make your web apps more responsive. Tip 1: Use web storage in place of cookies While cookies have been used to track unique user data for years, they have serious disadvantages.
These two web storage objects can be used to persist user data on the clientside for the length of the session or indefinitely. No guarantees, though. :) Non-Jquery Page Transitions lightweight | Free software downloads. Gérer ses dépendances JavaScript avec Google Closure Compiler / Library (1 / 2) JavaScript ne propose pas (encore) de moyen d’organiser son code et notamment de déclarer les dépendances entre les différents fichiers JavaScript de votre projet. Dans un langage compilé comme ActionScript ou Java, vous avez les directives « import pack.sub.MaClasse » qui vous permettent d’indiquer au compilateur qu’une classe requiert une autre classe pour fonctionner. Si vous avez quelques dizaines de lignes de code JavaScript dans votre projet, vous pouvez toutes les mettre dans un seul fichier ou directement dans le fichier HTML mais quand vous commencez à avoir plusieurs centaines / milliers de lignes de code, vous allez rapidement découper votre code en différent fichiers.
Comme il n’y a encore rien dans le langage pour vous aider, plusieurs librairies / systèmes ont été créés, notamment: Pour en apprendre plus sur RequireJS, une des plus populaires, je vous conseille de lire ce très long et très bon article @mklabs : RequireJS ➤ mo-du-la-ri-té ! Goog.provide(…) goog.require(…) Communicating with the Closure Compiler Service API - Closure Tools. Quick Tip: An Introduction to jQuery Templating. JavaScript Templating is a neat idea: it allows you to easily convert JSON to HTML without having to parse it. At Microsoft's MIX10 conference, they announced that they are starting to contribute to the jQuery team. One of their efforts is to provide a templating plugin. In this quick tip, I'll show you how to use it! You'll need the data to template; you'll likely retrieve JSON from your server; of course, Object / Array literals work just as well, so that's what we use: The template is written in <script type="text/html"></script> tags; for each item in your JSON, the template will render the HTML; then, it will return the entire HTML fragment to you.
To render the data with the template, call the plugin; pass the data to the plugin method; you can optionally pass in an options object as well. It's that easy! A supersonic bunch of smart LESS mixins. HTML5 Rocks - A resource for open web HTML5 developers. HTML5 Doctor, helping you implement HTML5 today.