Skip to content

Instantly share code, notes, and snippets.

@usualoma
Created December 3, 2015 19:08
Show Gist options
  • Save usualoma/930d6d00eb7f17d65af8 to your computer and use it in GitHub Desktop.
Save usualoma/930d6d00eb7f17d65af8 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
<style type="text/css">
body {
user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
}
label {
display: block;
width: 290px;
height: 170px;
position: absolute;
z-index: 1;
background: rgb(230, 230, 230);
padding-top: 110px;
text-align: center;
}
<% 0.upto(9) do |i| %>
#radio-<%= i %>:checked ~ #layer-<%= i+1 %> {
z-index: <%= i+2 %>;
}
<% end %>
</style>
</head>
<body>
<form>
<% 0.upto(9) do |i| %>
<input type="radio" name="radio" id="radio-<%= i %>" />
<% end %>
<% 9.downto(0) do |i| %>
<label for="radio-<%= i %>" id="layer-<%= i %>">Tap here!<br/>&lt;label for="radio-<%= i %>" id="layer-<%= i %>"&gt;</label>
<% end %>
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment