- 
      
 - 
        
Save while0pass/5386626 to your computer and use it in GitHub Desktop.  
Revisions
- 
        
LeaVerou revised this gist
Feb 24, 2013 . 2 changed files with 10 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,10 +23,18 @@ html { /* Shadows */ radial-gradient(50% 0, farthest-side, rgba(0,0,0,.2), rgba(0,0,0,0)), radial-gradient(50% 100%,farthest-side, rgba(0,0,0,.2), rgba(0,0,0,0)) 0 100%; background: /* Shadow covers */ linear-gradient(white 30%, rgba(255,255,255,0)), linear-gradient(rgba(255,255,255,0), white 70%) 0 100%, /* Shadows */ radial-gradient(farthest-side at 50% 0, rgba(0,0,0,.2), rgba(0,0,0,0)), radial-gradient(farthest-side at 50% 100%, rgba(0,0,0,.2), rgba(0,0,0,0)) 0 100%; background-repeat: no-repeat; background-color: white; background-size: 100% 40px, 100% 40px, 100% 14px, 100% 14px; /* Opera doesn't support this in the shorthand */ background-attachment: local, local, scroll, scroll; } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -44,6 +44,4 @@ <h1>CSS-only shadow-scrolling effect.</h1> <li>The end!</li> <li>No shadow there.</li> </ul> </div>  - 
        
LeaVerou revised this gist
Apr 22, 2012 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,8 +17,8 @@ html { background: /* Shadow covers */ linear-gradient(white 30%, rgba(255,255,255,0)), linear-gradient(rgba(255,255,255,0), white 70%) 0 100%, /* Shadows */ radial-gradient(50% 0, farthest-side, rgba(0,0,0,.2), rgba(0,0,0,0)),  - 
        
LeaVerou revised this gist
Apr 22, 2012 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,4 +26,7 @@ html { background-repeat: no-repeat; background-color: white; background-size: 100% 40px, 100% 40px, 100% 14px, 100% 14px; /* Opera doesn't support this in the shorthand */ background-attachment: local, local, scroll, scroll; }  - 
        
LeaVerou revised this gist
Apr 22, 2012 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,10 @@ * Degrades gracefully */ html { background: white; font: 120% sans-serif; } .scrollbox { overflow: auto; @@ -22,5 +25,5 @@ html { background: white; } radial-gradient(50% 100%,farthest-side, rgba(0,0,0,.2), rgba(0,0,0,0)) 0 100%; background-repeat: no-repeat; background-color: white; background-size: 100% 40px, 100% 40px, 100% 14px, 100% 14px; }  - 
        
LeaVerou revised this gist
Apr 22, 2012 . 1 changed file with 6 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,16 +12,15 @@ html { background: white; } max-height: 200px; margin: 50px auto; background: /* Shadow covers */ linear-gradient(white 30%, rgba(255,255,255,0)) local, linear-gradient(rgba(255,255,255,0), white 70%) 0 100% local, /* Shadows */ radial-gradient(50% 0, farthest-side, rgba(0,0,0,.2), rgba(0,0,0,0)), radial-gradient(50% 100%,farthest-side, rgba(0,0,0,.2), rgba(0,0,0,0)) 0 100%; background-repeat: no-repeat; background-color: white; background-size: 100% 30px, 100% 30px, 100% 14px, 100% 14px; }  - 
        
LeaVerou revised this gist
Apr 22, 2012 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,9 +14,11 @@ html { background: white; } background: white no-repeat; background-image: /* Shadow covers */ linear-gradient(white 30%, rgba(255,255,255,0)), linear-gradient(rgba(255,255,255,0), white 70%), /* Shadows */ radial-gradient(50% 0, farthest-side, rgba(0,0,0,.2), rgba(0,0,0,0)), radial-gradient(50% 100%,farthest-side, rgba(0,0,0,.2), rgba(0,0,0,0)); background-position: 0 0, 0 100%, 0 0, 0 100%;  - 
        
LeaVerou revised this gist
Apr 22, 2012 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,5 @@ /** * Scrolling shadows by @kizmarh and @leaverou * Only works in browsers supporting background-attachment: local; & CSS gradients * Degrades gracefully */  - 
        
LeaVerou revised this gist
Apr 22, 2012 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,8 @@ /** * Scrolling shadows * by @kizmarh and @leaverou * Only works in browsers supporting background-attachment: local; & CSS gradients * Degrades gracefully */ html { background: white; }  - 
        
LeaVerou revised this gist
Apr 22, 2012 . 1 changed file with 2 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,22 +4,15 @@ * Only works in browsers supporting background-attachment: local */ html { background: white; } .scrollbox { overflow: auto; width: 200px; max-height: 200px; margin: 50px auto; background: white no-repeat; background-image: linear-gradient(white 30%, rgba(255,255,255,0)), linear-gradient(rgba(255,255,255,0), white 70%),  - 
        
LeaVerou revised this gist
Apr 22, 2012 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,7 @@ /** * Scrolling shadows * by @kizmarh and @leaverou * Only works in browsers supporting background-attachment: local */ html { @@ -17,7 +18,8 @@ html { max-height: 200px; margin: 50px auto; background: #FFF no-repeat; background-image: linear-gradient(white 30%, rgba(255,255,255,0)), linear-gradient(rgba(255,255,255,0), white 70%),  - 
        
LeaVerou revised this gist
Apr 22, 2012 . 1 changed file with 11 additions and 21 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,7 @@ /** * Scrolling shadows * by @kizmarh and @leaverou */ html { background: #FFF; @@ -16,25 +19,12 @@ html { background: #FFF no-repeat; background-image: linear-gradient(white 30%, rgba(255,255,255,0)), linear-gradient(rgba(255,255,255,0), white 70%), radial-gradient(50% 0, farthest-side, rgba(0,0,0,.2), rgba(0,0,0,0)), radial-gradient(50% 100%,farthest-side, rgba(0,0,0,.2), rgba(0,0,0,0)); background-position: 0 0, 0 100%, 0 0, 0 100%; background-size: 100% 30px, 100% 30px, 100% 14px, 100% 14px; background-attachment: local, local, scroll, scroll; }  - 
        
kizu revised this gist
Apr 20, 2012 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,9 @@ /* Scrolling shadows by @kizmarh */ html { background: #FFF; } .scrollbox { position: relative; z-index: 1;  - 
        
kizu revised this gist
Apr 20, 2012 . 1 changed file with 2 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,13 +11,9 @@ margin: 50px auto; background: #FFF no-repeat; background-image: radial-gradient(50% 0, farthest-side, rgba(0,0,0,0.2), rgba(0,0,0,0)), radial-gradient(50% 100%,farthest-side, rgba(0,0,0,0.2), rgba(0,0,0,0)); background-position: 0 0, 0 100%; background-size: 100% 14px; }  - 
        
kizu revised this gist
Apr 20, 2012 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,6 +11,10 @@ margin: 50px auto; background: #FFF no-repeat; background-image: -moz-radial-gradient(50% 0,farthest-side,rgba(0,0,0,0.2),rgba(0,0,0,0)), -moz-radial-gradient(50% 100%,farthest-side,rgba(0,0,0,0.2),rgba(0,0,0,0)); background-image: radial-gradient(top,50% 100%,rgba(0,0,0,0.2),rgba(0,0,0,0)), radial-gradient(bottom,50% 100%,rgba(0,0,0,0.2),rgba(0,0,0,0)); @@ -34,4 +38,3 @@ margin: -30px 0 0; background: linear-gradient(top,rgba(255,255,255,0),#FFF 70%,#FFF); }  - 
        
kizu created this gist
Apr 20, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,37 @@ /* Scrolling shadows by @kizmarh */ .scrollbox { position: relative; z-index: 1; overflow: auto; width: 200px; max-height: 200px; margin: 50px auto; background: #FFF no-repeat; background-image: radial-gradient(top,50% 100%,rgba(0,0,0,0.2),rgba(0,0,0,0)), radial-gradient(bottom,50% 100%,rgba(0,0,0,0.2),rgba(0,0,0,0)); background-position: 0 0, 0 100%; background-size: 100% 14px; } .scrollbox:before, .scrollbox:after { content: ""; position: relative; z-index: -1; display: block; height: 30px; margin: 0 0 -30px; background: linear-gradient(top,#FFF,#FFF 30%,rgba(255,255,255,0)); } .scrollbox:after { margin: -30px 0 0; background: linear-gradient(top,rgba(255,255,255,0),#FFF 70%,#FFF); } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,49 @@ <h1>CSS-only shadow-scrolling effect.</h1> <div class="scrollbox"> <ul> <li>Not enough content to scroll</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> </ul> </div> <div class="scrollbox"> <ul> <li>Ah! Scroll below!</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> <li>6</li> <li>7</li> <li>8</li> <li>9</li> <li>10</li> <li>1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> <li>6</li> <li>7</li> <li>8</li> <li>9</li> <li>10</li> <li>1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> <li>6</li> <li>7</li> <li>8</li> <li>The end!</li> <li>No shadow there.</li> </ul> </div> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ {"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}