Book Image

Responsive Media in HTML5

By : Alex Libby
Book Image

Responsive Media in HTML5

By: Alex Libby

Overview of this book

Table of Contents (12 chapters)
Responsive Media in HTML5
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Allowing for vendor prefixes


While working on our code, have you noticed anything in particular, such as the apparent lack of need for vendor prefixes? That's right, to produce a basic responsive solution for a video doesn't require any, so it would be right to ask why we're now talking about needing to allow for them in our code!

The answer lies not in providing the basic styling needed to handle the <video> or <iframe> tags, but when we move into the realms of setting our video to display full screen or in the background. The former still needs vendor prefixes. While we could provide them manually, it is considered better practice to automatically add them at compilation.

Note

Before we go any further, this demo requires Node to be installed; this is available at http://nodejs.org/. Go ahead and install it for your platform before continuing.

Let's look at using the Autoprefixer plugin for Grunt, which ties in with the service from http://www.caniuse.com; the Grunt plugin is available...