Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>A solution is to use <strong>background-position to mimic the gradient transition.</strong> This solution was used in Twitter Bootstrap a few months ago.</p> <p><strong>Update</strong></p> <p><a href="http://codersblock.blogspot.fr/2013/12/gradient-animation-trick.html?showComment=1390287622614">http://codersblock.blogspot.fr/2013/12/gradient-animation-trick.html?showComment=1390287622614</a></p> <p>Here is a quick example:</p> <p><strong>Link state</strong></p> <pre><code> .btn { font-family: "Helvetica Neue", Arial, sans-serif; font-size: 12px; font-weight: 300; position: relative; display: inline-block; text-decoration: none; color: #fff; padding: 20px 40px; background-image: -moz-linear-gradient(top, #50abdf, #1f78aa); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#50abdf), to(#1f78aa)); background-image: -webkit-linear-gradient(top, #50abdf, #1f78aa); background-image: -o-linear-gradient(top, #50abdf, #1f78aa); background-image: linear-gradient(to bottom, #50abdf, #1f78aa); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff50abdf', endColorstr='#ff1f78aa', GradientType=0); background-repeat: repeat-y; background-size: 100% 90px; background-position: 0 -30px; -webkit-transition: all 0.2s linear; -moz-transition: all 0.2s linear; -o-transition: all 0.2s linear; transition: all 0.2s linear; } </code></pre> <p><strong>Hover state</strong></p> <pre><code>.btn:hover { background-position: 0 0; } </code></pre>
    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.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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