Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I've been wondering this exact same thing. The solution is actually quite simple. Although this is of course quite a modern feature, so you're stuck to browser compatibility.</p> <p>Webkit can take care of this with a single line of CSS:</p> <pre><code>-webkit-mask-image: -webkit-gradient(linear, left 90%, left bottom, from(rgba(0,0,0,1)), to(rgba(0,0,0,0))) </code></pre> <p>(The new standardised way of doing it is would use <code>mask-image</code> and <code>linear-gradient</code> using its new syntax. See caniuse.com for <a href="https://caniuse.com/#search=mask-image" rel="nofollow noreferrer"><code>mask-image</code></a> and <a href="https://caniuse.com/#search=linear-gradient" rel="nofollow noreferrer"><code>linear-gradient</code></a>.)</p> <p>This would fade out the bottom 10% of whatever element it's applied to, without using even so much as an image. You could add <code>padding-bottom: 50%</code> to make sure that content is only faded when there is more to scroll to.</p> <p>Source: <a href="http://www.webkit.org/blog/181/css-masks/" rel="nofollow noreferrer">http://www.webkit.org/blog/181/css-masks/</a></p> <p><s>A Mozilla (Gecko) fallback is a bit trickier though: you can use <a href="https://developer.mozilla.org/en/CSS/mask" rel="nofollow noreferrer">its 'mask' feature</a>, but this demands a SVG-image. You could try to <a href="https://stackoverflow.com/questions/1124149/embedding-background-image-data-into-css-as-base64-good-or-bad-practice">base64 embed that image into your stylesheet</a>...</s> Use <code>mask-image</code> in Firefox now.</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. 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