收藏
回答

web-view加载的页面的所有文字颜色都变成了黑色。

框架类型 问题类型 操作系统 操作系统版本 手机型号 微信版本
小程序 Bug Android MIUI 11.0.2 小米 7.0.9

web-view加载的页面的所有文字颜色都变成了黑色,小程序最近有什么调整吗?是否影响到了字体颜色和SVG的支持?谢谢。

使用多部手机测试,都出现一样的问题,仅出现在安卓手机的小程序中,即使以链接形式直接在安卓手机的微信中打开也正常。

最后一次编辑于  2019-12-16
回答关注问题邀请回答
收藏

1 个回答

  • 是小白啊
    是小白啊
    2019-12-16

    麻烦提供能复现问题的代码片段https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

    2019-12-16
    有用
    回复 5
    • 星梦枫
      星梦枫
      2019-12-16
      下面是一段SVG的代码,里面的fill应该是白色的,但在安卓的小程序里显示为黑色,感觉是fill没起到应有的作用。






      2019-12-16
      回复
    • 是小白啊
      是小白啊
      2019-12-16回复星梦枫
      代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)麻烦按照这个提供下
      2019-12-16
      回复
    • 星梦枫
      星梦枫
      2019-12-16
      出现问题的是web-view里的页面,并不存在小程序的代码。前面巾的被转义了。




      %3cdiv%20class%3d%22slideobject-maskable%22%20style%3d%22height%3a%2069px%3b%20width%3a%20862px%3b%20transform%3a%20translate(-1px%2c%20-1px)%3b%20will-change%3a%20contents%3b%22%20data-reactid%3d%22.0.0.3.2.0.1.0%3a%2462h2qI97JWl.0.3%3a%24c331.1%3a%24c360.%24slideobject433%22%3e%3csvg%20xmlns%3d%22http%3a%2f%2fwww.w3.org%2f2000%2fsvg%22%20data-xmlns-xlink%3d%22http%3a%2f%2fwww.w3.org%2f1999%2fxlink%22%20version%3d%221.1%22%20height%3d%2269%22%20width%3d%22862%22%20viewBox%3d%22-1%20-1%20862%2069%22%20data-commandset-id%3d%223%22%20data-accepts%3d%22events%22%20data-reactid%3d%22.0.0.3.2.0.1.0%3a%2462h2qI97JWl.0.3%3a%24c331.1%3a%24c360.%24slideobject433.%240%22%3e%3cg%20class%3d%22eventable%22%20data-accepts%3d%22events%22%20data-reactid%3d%22.0.0.3.2.0.1.0%3a%2462h2qI97JWl.0.3%3a%24c331.1%3a%24c360.%24slideobject433.%240.%240%22%3e%3cg%20id%3d%22uniqueDomId-435%22%20data-accepts%3d%22events%22%20data-reactid%3d%22.0.0.3.2.0.1.0%3a%2462h2qI97JWl.0.3%3a%24c331.1%3a%24c360.%24slideobject433.%240.%240.%240%22%3e%3cpath%20id%3d%22uniqueDomId-436%22%20fill%3d%22none%22%20d%3d%22M0%2c0%20L861%2c0%20861%2c68%200%2c68Z%22%20data-accepts%3d%22events%22%20data-reactid%3d%22.0.0.3.2.0.1.0%3a%2462h2qI97JWl.0.3%3a%24c331.1%3a%24c360.%24slideobject433.%240.%240.%240.%240%22%3e%3c%2fpath%3e%3c%2fg%3e%3cg%20id%3d%22uniqueDomId-437%22%20class%3d%22uneventable%22%20data-accepts%3d%22events%22%20data-reactid%3d%22.0.0.3.2.0.1.0%3a%2462h2qI97JWl.0.3%3a%24c331.1%3a%24c360.%24slideobject433.%240.%240.%241%22%3e%3cg%20class%3d%22vector-text-item%22%20data-reactid%3d%22.0.0.3.2.0.1.0%3a%2462h2qI97JWl.0.3%3a%24c331.1%3a%24c360.%24slideobject433.%240.%240.%241.%24r-439%22%3e%3cg%20transform%3d%22rotate(0%2c%200%2c%200)%20translate(0%2c%200)%22%20data-reactid%3d%22.0.0.3.2.0.1.0%3a%2462h2qI97JWl.0.3%3a%24c331.1%3a%24c360.%24slideobject433.%240.%240.%241.%24r-439.0%22%3e%3cg%20data-reactid%3d%22.0.0.3.2.0.1.0%3a%2462h2qI97JWl.0.3%3a%24c331.1%3a%24c360.%24slideobject433.%240.%240.%241.%24r-439.0.1%22%3e%3ctext%20font-family%3d%22%26quot%3bRockwell%20Extra%20BoldBoldDD588148%26quot%3b%22%20font-size%3d%2243px%22%20fill%3d%22%23FFFFFF%22%20fill-opacity%3d%221%22%20data-reactid%3d%22.0.0.3.2.0.1.0%3a%2462h2qI97JWl.0.3%3a%24c331.1%3a%24c360.%24slideobject433.%240.%240.%241.%24r-439.0.1.%240%22%3e%3ctspan%20x%3d%2210%2046%2083%20115%20147%20179%20199%20236%20272%20299%20310%20342%20376%20410%20421%20441%20478%20510%20547%20584%20622%20653%20687%20719%20739%20776%20813%20840%20851%22%20y%3d%2252%2052%2052%2052%2052%2052%2052%2052%2052%2052%2052%2052%2052%2052%2052%2052%2052%2052%2052%2052%2052%2052%2052%2052%2052%2052%2052%2052%22%20aria-hidden%3d%22true%22%20data-reactid%3d%22.0.0.3.2.0.1.0%3a%2462h2qI97JWl.0.3%3a%24c331.1%3a%24c360.%24slideobject433.%240.%240.%241.%24r-439.0.1.%240.%240%22%3eGREETINGS%26nbsp%3band%26nbsp%3bINTRODUCTIONS%26nbsp%3b%3c%2ftspan%3e%3c%2ftext%3e%3c%2fg%3e%3c%2fg%3e%3c%2fg%3e%3c%2fg%3e%3c%2fg%3e%3c%2fsvg%3e%3c%2fdiv%3e
      2019-12-16
      回复
    • 星梦枫
      星梦枫
      2019-12-16
      <div class="slideobject-maskable" style="height: 69px; width: 862px; transform: translate(-1px, -1px); will-change: contents;" data-reactid=".0.0.3.2.0.1.0:$62h2qI97JWl.0.3:$c331.1:$c360.$slideobject433"><svg xmlns="http://www.w3.org/2000/svg" data-xmlns-xlink="http://www.w3.org/1999/xlink" version="1.1" height="69" width="862" viewBox="-1 -1 862 69" data-commandset-id="3" data-accepts="events" data-reactid=".0.0.3.2.0.1.0:$62h2qI97JWl.0.3:$c331.1:$c360.$slideobject433.$0"><g class="eventable" data-accepts="events" data-reactid=".0.0.3.2.0.1.0:$62h2qI97JWl.0.3:$c331.1:$c360.$slideobject433.$0.$0"><g id="uniqueDomId-435" data-accepts="events" data-reactid=".0.0.3.2.0.1.0:$62h2qI97JWl.0.3:$c331.1:$c360.$slideobject433.$0.$0.$0"><path id="uniqueDomId-436" fill="none" d="M0,0 L861,0 861,68 0,68Z" data-accepts="events" data-reactid=".0.0.3.2.0.1.0:$62h2qI97JWl.0.3:$c331.1:$c360.$slideobject433.$0.$0.$0.$0"></path></g><g id="uniqueDomId-437" class="uneventable" data-accepts="events" data-reactid=".0.0.3.2.0.1.0:$62h2qI97JWl.0.3:$c331.1:$c360.$slideobject433.$0.$0.$1"><g class="vector-text-item" data-reactid=".0.0.3.2.0.1.0:$62h2qI97JWl.0.3:$c331.1:$c360.$slideobject433.$0.$0.$1.$r-439"><g transform="rotate(0, 0, 0) translate(0, 0)" data-reactid=".0.0.3.2.0.1.0:$62h2qI97JWl.0.3:$c331.1:$c360.$slideobject433.$0.$0.$1.$r-439.0"><g data-reactid=".0.0.3.2.0.1.0:$62h2qI97JWl.0.3:$c331.1:$c360.$slideobject433.$0.$0.$1.$r-439.0.1"><text font-family=""Rockwell Extra BoldBoldDD588148"" font-size="43px" fill="#FFFFFF" fill-opacity="1" data-reactid=".0.0.3.2.0.1.0:$62h2qI97JWl.0.3:$c331.1:$c360.$slideobject433.$0.$0.$1.$r-439.0.1.$0"><tspan x="10 46 83 115 147 179 199 236 272 299 310 342 376 410 421 441 478 510 547 584 622 653 687 719 739 776 813 840 851" y="52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52" aria-hidden="true" data-reactid=".0.0.3.2.0.1.0:$62h2qI97JWl.0.3:$c331.1:$c360.$slideobject433.$0.$0.$1.$r-439.0.1.$0.$0">GREETINGS and INTRODUCTIONS </tspan></text></g></g></g></g></g></svg></div>
      2019-12-16
      回复
    • 星梦枫
      星梦枫
      2019-12-17
      现在发现在SVG里设置的颜色都不起作用,最近有对web-view这个控件进行过升级吗?
      2019-12-17
      回复
登录 后发表内容
问题标签