[英]Opacity in bottom of the text while scrolling
I want to put Opacity on the bottom of this text and it should stay so while scrolling, but when I scroll at the end it should be seen. 我想将“不透明度”放在此文本的底部,并且在滚动时应保持不变,但是当我滚动到最后时,应该可以看到它。 How can I do this ? 我怎样才能做到这一点 ?
Here is my code: 这是我的代码:
//html large text goes here //css #wrapper { height: 600px; width: 700px; overflow: auto; position: absolute; left: 25%; }
For a cross-browser ( Internet Explorer greater or equal than 10 ) solution you can do something like this: 对于跨浏览器( Internet Explorer大于或等于10 )解决方案,您可以执行以下操作:
HTML 的HTML
<div>
content here
<div class="overlay"></div>
</div>
CSS 的CSS
.overlay {
position: fixed;
left: 0;
bottom: 0;
height: 200px;
width: 100%;
background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.