css 淡出效果(como usado no site da Sedcare)。
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css 淡出效果(como usado no site da Sedcare)。相关的知识,希望对你有一定的参考价值。
<div id="overlay">
<span>some text</span><br />
<img src="http://thinkingstiff.com/images/matt.jpg" width="100" /><br />
<p>some more text</p>
</div>
#overlay {
border: 1px solid black;
display: inline-block;
position: relative;
}
#overlay::before {
background-image: linear-gradient( top,
rgba( 255, 255, 255, 0 ) 0%, rgba( 255, 255, 255, 1 ) 100% );
background-image: -moz-linear-gradient( top,
rgba( 255, 255, 255, 0 ) 0%, rgba( 255, 255, 255, 1 ) 100% );
background-image: -ms-linear-gradient( top,
rgba( 255, 255, 255, 0 ) 0%, rgba( 255, 255, 255, 1 ) 100% );
background-image: -o-linear-gradient( top,
rgba( 255, 255, 255, 0 ) 0%, rgba( 255, 255, 255, 1 ) 100% );
background-image: -webkit-linear-gradient( top,
rgba( 255, 255, 255, 0 ) 0%, rgba( 255, 255, 255, 1 ) 100% );
content: "\00a0";
height: 100%;
position: absolute;
width: 100%;
}
以上是关于css 淡出效果(como usado no site da Sedcare)。的主要内容,如果未能解决你的问题,请参考以下文章