background preloader

CSS3

Facebook Twitter

Interaction Design and Design Strategy. An introduction to CSS3 | Zen Elements. CSS3 Opacity. CSS3 Opacity Need for Handling Transparency: Before the introduction of features in CSS3 for handling transparency of images the web design though took over in various aspects had a great limitation embedded in it. That is the print design can handle overlaying of text on a background which could either be an image or color background. This overlaying of text on background ability have the print design the ability of giving fading of text effect in the background and thereby handling the feature of transparency of images. What is Opacity in CSS3: Opacity is actually a property of CSS3 which gives its the ability to change the opacity of web design objects or elements and thereby make the element achieve the effect of fading and appearing thereby handling transparency of images.

Structure of Opacity in CSS3: The general syntax of the powerful feature opacity in CSS3 is as below: In the above the alphavalue denotes any value in the range from number 0.0 to 1.0 inclusive of both. For example. CSS BACKGROUND-COLOR - CSS3.com: CSS reference guide, and blog. CSS 3 selectors explained. In September and October of 2005 I published a series of articles that explained the selectors that are available in CSS 2.1. A quick summary is that most of the selectors described in those articles can be used now in modern browsers like Mozilla/Firefox, Safari, and Opera. We just need to wait for Internet Explorer to catch up before we can start using the full power of CSS 2.1 selectors. The good news is that Internet Explorer will catch up, at least to some extent, with the release of version 7.

If we look a little further ahead, there are even more powerful selectors waiting to be implemented and used in CSS 3. Many of the CSS 3 selectors have already been implemented in modern browsers, but in general support is far too patchy for developers to rely on these new selectors. However, there are cases where they can be used to add nice forward enhancing features, so I think taking a look at how the new selectors in CSS 3 work can be useful. Substring matching attribute selectors. Introduction to CSS3 – Part 1: What Is It? This article marks the first of several, providing an introduction to the new CSS3 standard which is set to take over from CSS2. We will be starting from the very beginning – taking you from not having even heard of CSS3, to feeling ready to hit it running as various features start to become more widely adopted. What is it? CSS3 offers a huge variety of new ways to create an impact with your designs, with quite a few important changes.

This first tutorial will give you a very basic introduction to the new possibilities created by the standard. Modules The development of CSS3 is going to be split up into ‘modules’. The Box ModelLists ModuleHyperlink PresentationSpeech ModuleBackgrounds and BordersText EffectsMulti-Column Layout View the full list of modules Timescale Several of the modules have now been completed, including SVG (Scalable Vector Graphics), Media Queries and Namespaces. How will CSS3 affect me? Hopefully, in a mainly positive way. Other posts in the series. CSS Compatibility and Internet Explorer. The document is archived and information here might be outdated With each new release of Windows Internet Explorer, support for the World Wide Web Consortium (W3C) Cascading Style Sheets (CSS) standard has steadily improved. Internet Explorer 6 was the first fully CSS, Level 1-compliant version of Internet Explorer.

Internet Explorer 8 is fully compliant with the CSS, Level 2 Revision 1 (CSS 2.1) specification and supports some features of CSS Level 3 (CSS3). Internet Explorer 9 adds even more support for many CSS3 modules. Note It is important to remember that many CSS3 modules are still in the Working Draft or Last Call stages. If your Web site targets browsers that include earlier versions of Internet Explorer, you want to know the level of CSS compliance for those versions. Note CSS features that are new to Internet Explorer 8 will only work when your page is rendered in IE8 mode (or higher). Introduction At-rules Selectors Element Selectors Attribute Selectors Combinators Pseudo-classes. CSS Padding. CSS3 borders, backgrounds and boxes. By Zi Bin Cheah, Vadim Makeev, David Storey Introduction In this article, we will showcase some examples made using the new properties in the W3C's CSS3 Backgrounds and Borders specification. We recommend using Opera 11 or later to view these examples in their full glory. background-clip The first CSS3 property that we'll introduce is background-clip.

This property is used to determine whether the background image extends into the border or not. There are two options, the default border-box and padding-box. Background-clip: border-box; background-clip: padding-box; In essence, padding-box clips the background image to the padding box while border-box clips the background image to the border.

Note that Gecko still uses their vendor prefix: -moz-background-clip. Background-origin The background-origin property is used to determine how the background-position of a background in a certain box is calculated. background-origin: border-box; background-origin: padding-box; Multiple background images code. How to recreate Silverback’s parallax effect. When I was a lad, I remember being wowed by an effect in Sonic the Hedgehog known as parallax scrolling. Moving my little spiky friend to the right caused the foreground to move past the camera to the left faster than the background, creating a faux-3D view of Green Hill Zone. We can create a similar effect on a web page by fixing semi-transparent background images to different sides of the browser viewport, and at different horizontal percentage positions.

In addition to this, blurring some of those images will emulate focus and depth-of-field. The effect can only be seen as the browser window is resized, but I really like the subtlety of this — not everybody will notice it, but it’s like a hidden Easter egg for those who do. I used this effect with great success on the holding page for Clearleft’s latest project, Silverback. Upfront about IE6 Frankly, this just ain’t gonna happen in IE6. Choosing a suitable scene Creating your layers Creating the parallax Nothing fancy for IE6. In the Lab: Doing strange things to CSS Backgrounds. So, last year you might remember me running through some experiments with using percentages to position your background-image in CSS. The short version: Percentages are slightly counter-intuitive but quite powerful — if it wasn’t for IE6-7 sucking by always minutely miscalculating them. In the original post we stuck mostly to the more predictable and commonly-used percentages — from 0-100%.

Today I thought we might look at some of the interesting things that happen if start to crank those numbers. Now to be clear, this is mostly ‘theoretical CSS’ in a Stu Nicholls kind of way and probably isn’t stuff you’ll be finding a use for every day. Hopefully it will, at least, be handy for helping you to get a good grip on the subtleties of how percentages interact with images. With luck it might even come in handy at some point in the future. Let’s look at a starting example, taking a background-image positioned 150% 0%. Negative percentages work the same way, only to the left of screen. Learn web standards :: hands on css tutorial. In this section you will learn how to create CSS rulestype selectorsthe background-color propertyspecifying color using hexadecimal RGB valuestext color with the color propertythe font-family propertysetting font-size using the em unitbackground images Project goals create some statements in our style sheet for the <body>, <p>, <h1>and <h2>elementsset a background image and color, font-size and font-family on the <body> elementset different font sizes for paragraphs and the different heading levels << 4. first style sheet | 6. text properties >> Have you looked at the web page in a browser yet?

As good a place as any is to set the background color for the whole page, so let's go to work. Our first statement As we said before, a style sheet is a set of rules, each of which specify the elements to be affected by the rule (the selector), and how these affected elements should appear (the properties). Creating the Selector x { } where x is the selector and { } contains the declaration of properties. CSS support chart - MDC Doc Center. This page lists supported CSS selectors, properties, @-rules, Media queries and values in alphabetical order. The "supported since" column indicates the Gecko version number in which support was introduced; versions prior to Gecko 1.0 are listed as 1.0. Gecko is the rendering engine used in Firefox and other applications; please see Gecko for more information about Firefox and Gecko version numbers.

The "specification" column links to one of the specifications in which the feature was first specified. However, in many cases, the feature in also specified, and extended, in newer specifications. The compatibility list in each specific article gives the detail of the specification history. Mozilla CSS extensions (those prefixed with -moz-) are mentioned in the "Notes" column to provide bug numbers and other hints regarding CSS support. Warning: Various specifications are still Working Drafts and several properties can be deleted, changed or renamed. Selectors Properties @-rules Values and Units. Showcasing the CSS Parallax Effect: 12+1 Creative Usages [Update2] › Kremalicious.

I mean Parallax Scrolling which is a technique often used in good ol' arcade and video games like Moon Patrol or Sonic the Hedgehog. In such 2D games parallax scrolling was used to create an illusion of three dimensional depth. Since our operating systems are mainly 2D too we can use this pseudo 3D technique to create the same illusion in our web browsers. Of course this was first done by flash designers and it’s a popular effect used in flash based websites or parts of it. But with the rise of CSS this technique can now be done without the use of flash as Alex Walker and Paul Annett discovered. You see we are now very close to the Atari with Web-Design. So it’s time for a first showcase of websites using this effect. So here are the examples.

Clearleft’s Silverback Teaser page The undeniable Kings of the Parallax, designed by Paul Annett. Starry Night An example by Chris Coyier from css-tricks.com. Percentage Backgrounds The Horse in Motion We all hate Quickbooks, Do You? Dumago Dromaeo cdev.ru. Starry Night: Incredible 3D Background Effect with Parallax. Super Awesome Buttons with CSS3 and RGBA. We've updated the super awesome buttons demo to include the button element and Mozilla box shadows. Check it out! We love CSS at ZURB. We love it so much that we're using the new, yet-to-be released version (CSS3) in some of our projects.

In the works for nearly 10 years now, CSS3 is finally starting to see the light at the end of the tunnel as new browsers like Firefox and Safari continue to push its implementation. One of our favorite things about CSS3 is the addition of RGBA, a color mode that adds alpha-blending to your favorite CSS properties. The Button Here's what we're looking at: Our original button we'll use to show how RGBA colors rock your world. It's a simple button made possible by a transparent PNG overlay (for the gradient), border, border-radius, box-shadow, and text-shadow. Not too shabby considering it's nearly all done with CSS. Making it Scale with RGBA Small Details.

There, now we have our super awesome button with some alpha blending added in. Done Deal. Transition Timing Functions < CSS. This article follows on from the related article on Animation using CSS Transforms and investigates the transition-duration and transition-timing-function properties which control, respectively, the duration and speed at which a transition is carried out. The examples on this page will currently only work if you download a WebKit Nightly Build web browser now work in Safari 5, Chrome 6, Opera 10 and Firefox 4 Beta. They will not work in Internet Explorer. 1. Transition Timing Function Options The transition-duration property is simple to understand.

It defines the total duration of a transition from state A to state B, whether the transition involves scaling, distorting, rotating or modifying the style of an element. The transition-timing-function is more difficult as it defines the rate at which the transition is carried out, which can involve speeding up and slowing down. The transition-timing-function property describes how the animation will proceed over time. Default » linear » 2. 3. Pushing Your Buttons With Practical CSS3 - Smashing Magazine. Advertisement CSS3 is the partially implemented sequel to the CSS2 spec we all know and love.

It’s already popping up in new browsers such as Firefox 3.5, Safari 4 and Chrome. In this article, the first of the articles that explore practical (and even far-fetched) implementation of CSS3, we start by applying CSS3 to something we all have to create: buttons. Calls to action are critical for any website, and a compelling, attention-grabbing, clickable button goes a long way toward driving that engagement. In the past, really awesome buttons needed extra markup, sliding doors or other trickery. We’ll show you here how to create nice button styles without any hacks or cheats. Step 1: The Super-Awesome Button Some time ago we published a post titled “Super Awesome Buttons with CSS3 and RGBa.”

Using Box-Shadow and RGBa Our first goal when we were about to create a versatile family of buttons was to eliminate the problem that HEX-based drop-shadows have on different backgrounds. Final Touches (al) CSS Properties Index – Jens O.