O'Reilly logo

Beginning iOS Application Development with HTML and JavaScript® by Richard Wagner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8

Styling with CSS

WHAT YOU WILL LEARN IN THIS CHAPTER:

  • Working with text styles and shadows
  • Styling block elements
  • Creating CSS buttons

Like its Mac and Windows cousins, the mobile version of Safari on IOS provides some of the best CSS support of all web browsers. As you develop IOS web applications, you can utilize CSS to make powerful user interfaces.

Safari provides support for much of CSS 2.1 as well as parts of CSS3. However, Safari also supports some properties technically called “experimental CSS3” that are not currently part of the W3C CSS standard; these properties will be supported by Apple going forward. (Hint: A -webkit- prefix is added to the names of these properties.) For a normal web app, most developers typically stay away from these experimental properties, or at least they don’t rely upon them for their application’s design. However, because you know that your app will be accessed exclusively by an IOS device, you can safely use these more advanced styles as you create your UI.

In this book, you’ve already been introduced to using CSS to create IOS interfaces. In this chapter I’m continuing that discussion and diving deeper into various CSS techniques.

CSS SELECTORS SUPPORTED IN SAFARI

Many would contend that the real power of CSS is not so much in the properties that you can apply, but in CSS’s ability select the exact elements within a DOM that you want to work with. If you have worked with CSS before, you are probably familiar with the standard ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required