0
所以使用此代碼使用CSS梯度來完成淡出
#grad1 {
height: 100px;
background: -webkit-linear-gradient(bottom, rgba(243,243,243,0), rgba(243,243,243,9)); /* For Safari 5.1 to 6.0 */
background: -o-linear-gradient(top, rgba(243,243,243,0), rgba(243,243,243,9)); /* For Opera 11.1 to 12.0 */
background: -moz-linear-gradient(top, rgba(243,243,243,0), rgba(243,243,243,9)); /* For Firefox 3.6 to 15 */
background: linear-gradient(to top, rgba(243,243,243,0), rgba(243,243,243,9)); /* Standard syntax (must be last) */
}
我能夠完成一個css背景漸變淡出,但我只是想最底部褪色。
我有一個固定的標題,並希望它在底部淡出以平滑滾動。
任何想法?
完全相同的結果 –
添加顏色停止一個例子....否則你就必須提供什麼是你想要的圖像。 –