Une taille de police en fonction de la largeur d’écran J’ai souvent eu l’occasion à travers mes divers projets Web mobile (responsive), d’avoir à réduire la taille des polices de titre car même un simple mot ne passait pas en largeur. Pour éviter d’avoir une césure sur chaque mot du titre, le plus simple était de s’autoriser une réduction approximative du corps. (approximative… façon de parler). Je vous propose des solutions relative. CSS3 à la rescousse Il existe une unité encore peu connue car prise en charge par nos navigateurs depuis peu de temps, il s’agit des unités relative au viewport. Pour résumer, nous allons proposer un corps de texte qui dépend de la largeur de la fenêtre du navigateur. Très bien, mais que représente une unité de vw, par exemple ? Prenons un exemple plus parlant. Mon corps de texte aura un équivalent de 10% de la largeur de mon viewport, à savoir la largeur de la fenêtre de votre navigateur. Il vous faudra donc recharger la page sur la page de démonstration à chaque redimensionnement de la fenêtre du navigateur.
The Goldilocks Approach to Responsive Web Design Workless - A classy HTML5, CSS3 framework Separation, Abstraction, and Cascading in CSS | LispCast TLDR: LESS and Sass (and similar solutions) have saved CSS for three reasons: separation, abstraction, and cascading. While I welcome them, CSS still has other problems which I believe can be solved. I propose some solutions. Introduction A lot is said about LESS and Sass, and for good reason. But when people talk about why they are so great, they miss the main point. In this essay, I will try to put into words (and some pictures) what my intuition tells me as a developer and programming language enthusiast to clarify why CSS is innately unmaintainable, does not satisfy its own design goals, and why LESS and Sass make a bad language more bearable. Zero Degrees of Separation Way back when, people used HTML tables to style their pages. Those were the days of font tags and tables. Then CSS came along, and people talked a lot about separation of content from presentation. Your styles were still tied to the structure of the document they were styling. HTML and CSS are separate but not equal.
Foundation: HTML Templates News or Magazine This template puts a focus on bold images, perfect for a magazine style site with eye catching content. Your stories are easy to find with large feature blocks. See Demo Real Estate or Travel Big thumbnails with a space for captions and descriptions along with an informative header make this the perfect template for real estate or hotel booking. See Demo Ecommerce Homepage Building an online store? See Demo Agency Bring your work to the forefront with this sleek template that's perfect for agencies or freelancers. See Demo Blog w/ Sidebar Large images, an easy to navigate layout, and versatile sidebar will help you get your blog up and running. See Demo Blog Single Column This sleek, minimal approach can help your blog stand out by putting content front and center. See Demo Portfolio Show off your work and highlight what you do with this grid style thumbnail layout. See Demo Product Page Highlight your new product and educate potential customers with this classic template. See Demo
kit scaffolding All headers from h1 to h6 are available. h3 Header h4 Header h5 Header h6 Header <h1>h1. Text elements You can use tags i or b, but they often use for icons or other stuff, so it is better to avoid them. StrongItalicSmall text Paragraph text <strong>Strong</strong><em>Italic</em><small>Small text</small>This is<abbr title="Abbr">Abbr</abbr><p>Paragraph text</p> Code Use it if you have any code you want to show to user. Address If you want to separate parts of an address, use several address tags. <address> <strong>Vetrenko Maxim</strong> <div>Gagaryinskiy 27 <br/>Moscow <br/> <abbr title="Cell phone">p:</abbr> <span>+7 960 628 6999</span> </div></address><address> <strong>Email</strong> <div> <a>me@maxmert.com</a> </div></address> Blockquotes Quoted blocks used when you have some text cited from another source. Lorem ipsum dolor sit amet, consectetur adipiscing elit. <blockquote> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Marked lists Numbered lists Descriptions Description lists
All you need to know about CSS Transitions CSS3 transitions bring simple and elegant animations to web applications, but there’s a lot more to the spec than first meets the eye. In this post I’m going to delve into some of the more complicated parts of CSS transitions, from chaining and events to hardware acceleration and animation functions. Letting the browser control animations sequences allows it to optimize performance and efficiency by altering the frame rate, minimizing paints and offloading some of the work to the GPU. Browser support CSS transitions are supported in practically every version of Firefox, Safari and Chrome. They’re supported in IE 10 and onwards. Webkit based browsers (Safari and Chrome), still require -webkit prefixes for animations and gradients, but these are soon being removed. Applying transitions A simple way of applying transitions is with CSS pseudo-classes, such as :hover. duration is the only required item in the transition shorthand. Transitioning gradients Hardware acceleration Clipping Redrawing
Skeleton: Beautiful Boilerplate for Responsive, Mobile-Friendly Development