Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can do a lot just with CSS</p> <p>The basic idea is to change attributes of each state of the button using pseudo classes <code>.cssclass:hover</code> to mouse over state and <code>.cssclass:active</code> to mouse down.</p> <p><img src="https://i.stack.imgur.com/3cakx.png" alt="Normal button state"><strong>normal</strong></p> <pre><code> /* style of the button in normal state */ button.css3button{ padding: 0.5em; background-color: lightblue; border: 4px outset green; color: green; border-radius: 4px; } </code></pre> <p><img src="https://i.stack.imgur.com/sUo1C.png" alt="when mouse is over the button"><strong>:hover</strong></p> <pre><code>/* properties that change when mouse over */ button.css3button:hover { background-color: lightgreen; } </code></pre> <p><img src="https://i.stack.imgur.com/MfcxB.png" alt="when mouse is down"><strong>:active</strong></p> <pre><code>/* properties that change when mouse down */ button.css3button:active { color: yellow; border: 4px inset red; } </code></pre> <p>Live Demo: <a href="http://jsfiddle.net/J7qKg/2/" rel="nofollow noreferrer">JSFIDDLE</a></p> <hr> <p>more complex styling examples with CSS3:</p> <p><img src="https://i.stack.imgur.com/ZkEP6.png" alt="enter image description here"></p> <pre><code>&lt;button type="button" name="" value="" class="css3button"&gt;submit&lt;/button&gt; button.css3button { font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #ffffff; padding: 10px 20px; background: -moz-linear-gradient( top, #bfc2ff 0%, #82b4ff 25%, #4664fa); background: -webkit-gradient( linear, left top, left bottom, from(#bfc2ff), color-stop(0.25, #82b4ff), to(#4664fa)); -moz-border-radius: 30px; -webkit-border-radius: 30px; border-radius: 30px; border: 3px solid #ffffff; -moz-box-shadow: 0px 3px 11px rgba(000,000,000,0.5), inset 0px 0px 1px rgba(49,141,212,1); -webkit-box-shadow: 0px 3px 11px rgba(000,000,000,0.5), inset 0px 0px 1px rgba(49,141,212,1); box-shadow: 0px 3px 11px rgba(000,000,000,0.5), inset 0px 0px 1px rgba(49,141,212,1); text-shadow: 0px -1px 0px rgba(000,000,000,0.2), 0px 1px 0px rgba(255,255,255,0.3); } </code></pre> <p>Demo: <a href="http://jsfiddle.net/GAtZF/1/" rel="nofollow noreferrer">JSFIDDLE</a></p> <p>you can of course change sizes, colors, gradients for each state <code>:hover</code> <code>:active</code> <code>:visited</code> on your own taste, you can style almost anything <code>&lt;a&gt; &lt;span&gt; &lt;div&gt; &lt;button&gt;</code></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload