skulbuny

Whenever 140 characters just isn't enough, I resort to this. If you want more of my mind, check out my twitter. It gets updated more than this.

Click here to go back to skulbuny.com

Design of a desktop OS’ modal/window.
See the forrst post here.

Design of a desktop OS’ modal/window.

See the forrst post here.


A little redesign I made for twitter’s profile modal.
Check it out on forrst!

A little redesign I made for twitter’s profile modal.

Check it out on forrst!


Have you ever seen the apps with rounded corners like this or this? Well, we’re going to be able to make a web app look like that on iOS devices, like this.

See a live demo of this tutorial here!

*You’re going to need to view this demo on an iPhone 4 to see the rounded corners effect, otherwise, you’ll just get a regular test page.

We’re going to need some basic CSS, CSS3, and a little HTML to get this little, but nice, aesthetic feature up and running, so open up your favorite website editor and get started!

So, we’re first going to need insert two <div> tags right below the body tag, above everything else you may have, like so:

<html lang="en">
<head>
<title>Awesome Website Title Here</title>
<link rel="stylesheet" href="path/to/stylesheet.css" media="screen" />
</head>
<body>
<div id="topframe" class="frame"></div>
<div id="bottomframe" class="frame"></div>
</body>
</html>

We will now need to make our mask. To do this, we have to do either A) A little Photoshopping, or B) use my premade masks for the rounded corners. Here is my “topframe.png” and here is my “bottomframe.png”

Please note: I’m not going to give a tutorial on how to create these masks. Just remember that they should be rounded to about 12px per corner, and there should be a white highlight sitting inside of the black mask. And remember to make them into two separate images!

On to the CSS! We have to make this frame to only be seen by iPhone 4 users. The iPhone 4 uses 2 pixels per point, so it has a pixel-ratio of 2. Luckily, the iOS Dev Team made it so CSS3 @media queries can speak speak specifically to these devices with a pixel ratio of 2, with @media (-webkit-min-device-pixel-ratio: 2). Here is the CSS I used for the demo given above, you’ll want to stick this at the bottom of your preferred CSS stylesheet: 

@media only screen and (-webkit-min-device-pixel-ratio: 2){
#topframe {height: 6px; top: 0; background-image: url("../img/topframe.png"); -webkit-background-size: 320px 6px;}
#bottomframe {height: 6px; bottom: 0; background-image: url("../img/bottomframe.png"); -webkit-background-size: 320px 6px;}
.frame {position: fixed; z-index: 10000; width: 320px; left: 0; background-repeat: no-repeat;}
}

I followed most of the steps given from this blog post to help me get this CSS right. You have to make your height and width half of what it really is for it to be displayed correctly. The z-index is that high so it sits above any other object you may have on your page, like a popup, modal, or navbar. These frames are fixed because they need to stay still above your site. Don’t change it!

The only thing you should be changing is the path to your images, and possibly the height. Don’t change anything in .frame!

That should cover most of it! If you have any questions about this tutorial, shoot them at me at:

  1. twitter
  2. tumblr
  3. my email address

Thanks for reading, and enjoy those sweet looking rounded corners on your web apps!


Just stick this little guy in your <head> and add your site to your iOS home screen!

<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" /> 
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta names="apple-mobile-web-app-status-bar-style" content="black-translucent" />

humblebundle:

We’ve been conducting an informal experiment during the Humble Bundle for Android 2, by quietly asking Android users to opt in to be counted in our platform breakdown to get a better understanding of where they fit into the cross-platform puzzle.


More than 25,000 of you DID IT FOR SCIENCE