When a user clicks a button...
#featured-challenge-button {
background-color: #446CB3;
box-shadow: 3px 3px 5px black;
&:hover {
background-color: #ccac00;
box-shadow: none;
}
&:active {
background-color: #ccac00;
box-shadow: none;
}
&:focus {
background-color: #ccac00;
box-shadow: none;
}
}
Button Examples:
# link_to
<%= link_to next_challenge_path, class: "btn", id: "featured-challenge-button" do %>
<span class="glyphicon glyphicon-plus"></span>
<% end %>
# submit
<%= button_tag(type: 'submit', class: "btn", id: "featured-challenge-button") do %>
Save
<% end %>
how can I show that it is immediately pressed?
On the browser it works, but on my iPhone there is no effect on the button upon being clicked. The only indication that the button was clicked is the loading bar on the top of the screen.
Am I using :active
wrong or is there another CSS technique or is there a javascript solution?