background preloader

Css3

Facebook Twitter

Compatibility

Webkit. Multiple Backgrounds and Borders with CSS 2.1 – Nicolas Gallagher – Blog & Ephemera. Using CSS 2.1 pseudo-elements to provide up to 3 background canvases, 2 fixed-size presentational images, and multiple complex borders for a single HTML element. This method of progressive enhancement works for all browsers that support CSS 2.1 pseudo-elements and their positioning.

No CSS3 support required. Support: Firefox 3.5+, Safari 4+, Chrome 4+, Opera 10+, IE8+. How does it work? Essentially, you create pseudo-elements using CSS (:before and :after) and treat them similarly to how you would treat HTML elements nested within your target element. But they have distinct benefits – beyond semantics – over the use of nested HTML elements. To provide multiple backgrounds and/or borders, the pseudo-elements are pushed behind the content layer and pinned to the desired points of the HTML element using absolute positioning. The pseudo-elements contain no true content and are absolutely positioned. What effects can be achieved? Most structural elements will contain child elements. BonBon Buttons - Sweet CSS3 buttons. There was a goal: Create CSS buttons that are sexy looking, really flexible, but with the most minimalistic markup as possible. And voila.. here they are, the BonBon Buttons. Named after the French word for "Candy". So, let's take a tour trough the candy store.

No, wait! Markup I get a real kick out of trying to keep the markup minimal, so I'm really happy with the outcome. You can change the look by adding more classes: <a href="" class="button orange glossy">Label</a> Label Icons Accessibility Addingrole="button" makes it more accessible. Looks I tried to avoid any images but couldn't resist adding a PNG for the noise. A border-radius doesn't always need to be rounded. For the colors HSL values are used. I tried to simulate different materials.

The glossy shape is created using an :after element with a gradient background on top. Flexibility Here all the optional class names if you wanna play around with -webkits Inspector or Firebug: Queen Rain There is one thing I'm kinda sad about. Note. Experimenting with CSS gradients. No images were harmed in the making of this page. All elements below are built on pure CSS3 magic (and a bit of JS for the progress bars), no images have been used. This page is visible only on Chrome, Safari, Android and iPhone/iPod touch. Let's start with something simple: just one gradient, border-radius, text-shadow and box-shadow. Grey Boxview code Black Buttonview code Gradients may have as many color-stops as you want. Here an example with 4 color stops and a semi-transparent border. Win7 RedWin7 Blueview code You can also mix linear with radial gradients. Glossyview code Mixing two radial gradients we get a nice gem effect. Gem GreenGem Orangeview code And now the fun part.

Progress barview code Barber shop An extremely complex array of radial gradients. Burnview code Read related article on cubiq.org. 29 Useful Things you can do with CSS3 | Underworld Magazines Design Blog. Media queries &amp; Drupal | Millwood Online. This article is pretty old now and may or may not be accurate, please get in contact if you are looking for some help with your Drupal media queries Media queries are getting more and more popular in web design to allow your web site to change depending on the screen resolution, or screen orientation. It is very simple to add media queries to your Drupal theme. To define a CSS file in your Drupal theme's info file you would usually write declarations such as: stylesheets[all][] = style.css or stylesheets[screen][] = style.css etc To use media queries you can write declarations such as stylesheets[screen and (max-width: 600px)][] = screen-600.css stylesheets[screen and (orientation:landscape)][] = screen-landscape.css You can also define media queries within your CSS file.

@media screen and (max-device-width: 600px) { } At Mark Boulton Design we are using media queries within the CSS file on practical-ia.com with Drupal. More info about adding style sheets to your Drupal theme. How to Create a Cool Slide Out Panel with CSS3 only. Many sites have a really cool hidden panel which contains some relevant information and this panel is revealed to us, with a cool animation, when we click on a particular button or hover over it. This has usually been achieved using jQuery. But now as we advent towards the future and CSS3 is becoming a reality, here is a tutorial on how to build an animated slide out panel using only CSS3.

Note: This tutorial uses some advanced css3 techniques which are not yet supported in Firefox. To get the full version, you should see the live demo in a web-kit engine for example Safari and Chrome. Step 1: Analyzing the Goal A slide out panel can be used for various ways. Now once the viewer hovers over the subscribe button on the top right hand corner, the whole hidden panel will come sliding down with a very smooth animation effect revealing the subscribing options to the visitor.

Step 2: Creating the xHTML skeleton The body is divided into two parts, the slide-out and themain-container. Conclusion. HTML5Rocks - Home. 50 New Useful CSS Techniques, Tools and Tutorials - Smashing Magazine. Advertisement Over the last years we’ve got a pretty good understanding of what CSS does, how it works and how we can use it for our layouts, typography and visual presentation of the content.

However, there are still some attributes that are not so well-known; also, CSS3 offers us new possibilities and tools that need to be understood, learned and then applied in the right context to the right effect. In this round-up we present fresh useful articles about less-known CSS 2.1 and CSS3 properties as well as an overview of recently published CSS techniques, tools and tips for designers and web-developers. Please stay tuned: next week we will present the second part of this article, featuring fresh CSS3 techniques, tools and resources. Learn About Obscure CSS Properties The Little Known font-size-adjust PropertyEver wanted to use fallback fonts on your CSS with different aspect ratios without them looking huge (or tiny)? Useful CSS Techniques Useful CSS Tools, Tips and Advice CSS 3, Please!

HTML5 Readiness. CSS3 Please! The Cross-Browser CSS3 Rule Generator. CSS | CSS3 Css tutorials Free css templates and css menu — Blog css3 and css. Css guide, css tutorials, free css templates and free css menu.