是否能够滚动提示

Published by Xianqiao Wang on May 4th, 2016


background-repeat: no-repeat;
background-position: top, top, bottom, bottom;
background-attachment: local, scroll, local, scroll;
background-size: 100% 50px, 100% 15px, 100% 50px, 100% 15px;
background-image: linear-gradient(white 30%, transparent),
                  radial-gradient(at 50% 0, rgba(0, 0, 0, .2), transparent 70%),
                  linear-gradient(to top,white 30%, transparent),
                  radial-gradient(at 50% 100%, rgba(0, 0, 0, .2), transparent 70%);

滚动时在顶部显示阴影,原理主要是利用background-attachment: local, scroll;

chrome 渐变就算设置为local也不会随内容滚动?
http://www.w3cplus.com/css3/css-secrets/scrolling-hints.html