Book Image

HTML5 iPhone Web Application Development

By : Alvin Crespo
Book Image

HTML5 iPhone Web Application Development

By: Alvin Crespo

Overview of this book

<p>Create compelling web applications specifically tailored for distribution on iOS Safari. Work through real world examples with references, and in-depth discussions on the approach; including its benefits and drawbacks.<br /><br />"HTML5 iPhone Web Application Development" strives to teach all levels of developers, beginners and professionals, the process of creating web applications for iOS Safari. Utilizing current industry standards for frontend development, learn to take advantage of HTML5, CSS3 and JavaScript to create compelling software.<br /><br />Start with reviewing current industry standards for frontend development, and end with creating a native application using the same codebase.</p> <p>Your journey will begin with an overview of current industry standards for frontend technology, quickly moving to solve real world issues; from creating a resizable or responsive gallery, to creating a single page application that utilizes the popular Backbone.js framework.</p> <p>"HTML5 iPhone Web Application Development" aims to make you an expert in developing web applications for the iOS Safari platform.</p>
Table of Contents (17 chapters)
HTML5 iPhone Web Application Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Customizing HTML5 video controls


We probably want more input into the video controls, from styling to video functionality, such as adding a stop button. In order to do this we need to modify our markup a bit. We should do the following with the video:

<div class="video-container">
    <video src="../assets/testvid.mp4" controls preload>
        <p>Video is not supported in your browser.</p>
    </video>
</div>

All we did here was add a class containing div around the video element and added a class of video-container to it. Now we want to add some responsive styling to the video element, so let's open up video.css and add the following styles:

video {
    display: block;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}

.video-container {
    width: 100%;
}

The first selector will apply to all the video elements on the page, and we are telling each element to have a width of 100 percent relative to its container, but to only have a max width of...