Skip to content

Instantly share code, notes, and snippets.

@dalmaer
Created August 29, 2011 04:35
Show Gist options
  • Save dalmaer/1177776 to your computer and use it in GitHub Desktop.
Save dalmaer/1177776 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title>Android Style</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
</head>
<body>
<style type="text/css">
input[type=radio] {
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
input[type=button] {
display: inline-block;
padding: 9px 30px;
font-family: "Droid Sans",Helvetica,Verdana;
background-color: #f2681f;
border: 1px solid rgba(121,83,62,0.5);
color: #fff;
background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, rgb(246,171,89)), color-stop(0.5, rgb(242,117,54)), color-stop(0.51, rgb(242,104,31)), color-stop(1, rgb(242,131,73)));
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-user-select: none;
-webkit-border-radius: 5px;
}
#b.active {
background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, rgb(181,139,89)), color-stop(0.5, rgb(217,104,48)), color-stop(0.51, rgb(217,94,28)), color-stop(1, rgb(217,118,64)));
}
</style>
<form>
<input type="radio" name="r" value="whee">
<input type="button" value="Continue" id="b">
</form>
<script>
$("#b").bind("touchstart", function(e) {
$(this).addClass("active");
});
$("#b").bind("touchend", function(e) {
$(this).removeClass("active");
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment