gpt4 book ai didi

iphone - 使用 CSS 淡化 UIWebView 的底部

转载 作者:行者123 更新时间:2023-11-28 14:49:32 27 4
gpt4 key购买 nike

我正在尝试淡出 detailView 中 UIWebView 的底部。它更像是褪色最后 20-40 像素。我正在为“ReadMoreFade”(link)使用 CSSTricks 代码。下面粘贴了我的简化版本。

我的问题是当我开始在 UIWebView 中滚动时,褪色区域像 block 一样停留在那里。我附上了显示此内容的屏幕截图。有什么建议或提示吗?谢谢。

截图: 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>

最佳答案

对于这种情况,我只制作一个具有透明渐变的白色图像,并根据需要将其覆盖在该 UIWebView 之上。这将比尝试调试浏览器内容快得多...

关于iphone - 使用 CSS 淡化 UIWebView 的底部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4796097/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com