android webview黑线,ios – React Native WebView在底部渲染意外边框

这有点难以描述.我正在使用react本机WebView组件来制作迷你浏览器.它工作正常,但它底部有一个奇怪的黑色边框,我没有放入.它在滚动到或超出网页底部时出现.

您可以在下面的“blah”文本上方看到细黑线. blah文本和底部粉红色部分的原因是在WebView或其容器上排除了一个迷路borderBottom *样式.

另外需要注意的是,重新加载页面时边框会短暂消失,因此它似乎在WebView的html中.但我不明白如何或为什么,因为a)它出现在所有网站上,b)它没有出现在其他iOS浏览器中.

我在这做什么奇怪的事吗?

截图:

元素和风格:

{this.addressbarButtonProps().map(props => React.createElement(Button,{ ...props,key: props.title }))}

ref={ADDRESSBAR_REF}

placeholder="type url"

style={{ minWidth: this.screenWidth - 50 * this.addressbarButtonProps().filter(b => !b.hidden).length - 10 }}

/>

ref={WEBVIEW_REF}

source={{uri: this.state.uri}}

style={{ ...styles.web,width: this.screenWidth,paddingBottom: 0,padding: 0 }}

scalesPageToFit={true}

allowsInlineMediaPlayback={true}

onMessage={m => this.onMessage(m.nativeEvent.data)}

injectedJavaScript={js}

startInLoadingState={true}

/>

blah

const styles = {

container: {

paddingTop: 20,flex: 1,alignItems: "center",justifyContent: "space-between",backgroundColor: "#fafafa",borderBottomColor: "pink",borderBottomWidth: 100

},header: {

flexDirection: "row",alignItems: "flex-start",justifyContent: "flex-start",alignSelf: "stretch"

},web: {

flex: 1,borderBottomColor: "#fafafa",backgroundColor: "#fafafa"

}

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值