9***@qq.com
9***@qq.com
  • 发布:2025-04-10 20:12
  • 更新:2025-04-17 14:35
  • 阅读:2239

ios里面text-decoration-line完全不起作用啊,两个属性都不起作用

分类:uni-app x

line-through和underline

2025-04-10 20:12 负责人:无 分享
已邀请:
DCloud_UNI_JBB

DCloud_UNI_JBB

可以发下复现代码吗?

  • 7***@qq.com

    <text class="price-text" style="text-decoration-line: line-through;">¥123</text>

    出现相同问题,ios无法实现贯穿划线,安卓、h5都能正常实现,就ios没有体现出来。hbx版本号为4.57

    2025-04-17 11:17

  • DCloud_UNI_JBB

    回复 7***@qq.com: 下面我发了效果图,是不是你的样式影响到了

    2025-04-17 11:33

DCloud_UNI_JBB

DCloud_UNI_JBB

我这边没有复现

  • 9***@qq.com (作者)

    这个是ios的模拟器吗? 我没有用模拟器,是在iphone15真机调试出现的问题,代码就是简单的text,类似下面这样


    <text style="color:#7a7a7a;text-decoration-line: line-through;padding-right:10rpx;" >$10.00</text>

    2025-04-10 22:00

  • 9***@qq.com (作者)

    其实underline我在iphone上也不行,但是underline我就用border代替了。 hbuilderx版本是4.56。

    2025-04-10 22:02

  • 9***@qq.com (作者)

    能用iphone真机试下吗?看看是否正常

    2025-04-10 22:05

  • DCloud_UNI_JBB

    回复 9***@qq.com: 我明天试下吧

    2025-04-10 22:08

  • 9***@qq.com (作者)

    回复 DCloud_UNI_JBB: 有结果吗?

    2025-04-11 12:30

  • DCloud_UNI_JBB

    回复 9***@qq.com: 我刚刚试了,正常运行了

    2025-04-11 14:49

  • 9***@qq.com (作者)

    回复 DCloud_UNI_JBB: 我这边不行可能的原因是什么呢? 安卓正常的话,说明代码字母没写错。

    2025-04-11 15:22

DCloud_UNI_JBB

DCloud_UNI_JBB

ios真机运行效果

DCloud_UNI_JBB

DCloud_UNI_JBB

ios真机运行效果图

  • 7***@qq.com

    经过多台ios设备和多机型模拟真机的系统版本测试得出结论是,ios 18系统以上的机型无法体现text-decoration-line贯穿划线效果。

    2025-04-17 12:41

  • yuewanxinghui

    回复 7***@qq.com: 我IOS18.3.2上能显示中划线和下划线效果

    2025-04-17 13:43

  • 7***@qq.com

    回复 yuewanxinghui: 我的也是IOS 18.3.2 iphone 15 pro max 请问你的是什么机型?

    2025-04-17 13:58

  • DCloud_UNI_JBB

    回复 yuewanxinghui: 我这边再确认下

    2025-04-17 14:00

  • DCloud_UNI_JBB

    回复 yuewanxinghui: 我上面截图就是 ios 18.3.2 的效果图

    2025-04-17 14:41

  • yuewanxinghui

    回复 7***@qq.com: iphone 13

    2025-04-17 16:52

DCloud_UNI_JBB

DCloud_UNI_JBB

ios 16.4 模拟器测试效果

要回复问题请先登录注册