【发布时间】:2011-06-15 07:55:03
【问题描述】:
我正在尝试在我的 detailView 中淡出 UIWebView 的底部。这更像是最后 20-40 像素的褪色。我正在为“ReadMoreFade”(link)使用 CSSTricks 代码。我的简化版贴在下面。
我的问题是当我开始在 UIWebView 中滚动时,褪色区域像块一样停留在那里。我附上了显示这一点的屏幕截图。有什么建议或提示吗?谢谢。
屏幕截图: http://i51.tinypic.com/2rmxsfp.png
<!DOCTYPE html>
<html>
<head>
<title>Fade bottom</title>
<style>
body{background:#FFF}
p {
color:#000;
margin:0 auto;
text-align:justify;
text-indent:30px;
width:600px;
}
#fadeBottom {
background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0, rgba(255,255,255,0)),color-stop(1, rgba(255,255,255,0.7)));
bottom:0;
height:50px;
left:0;
position:fixed;
width:100%;
}
</style>
</head>
<body>
<p>Some long text here. Lorem ipsum?</p>
<div id="fadeBottom"></div>
</body>
</html>
【问题讨论】:
标签: iphone css uiwebview webkit fade