收藏
回答

请问同一行text文本中可以有2种不同的样式吗?

比如这种的 我想:左边是一种样式,右边是另一种样式。有什么方法可以做到吗?

回答关注问题邀请回答
收藏

3 个回答

  • 哄哄
    哄哄
    2020-03-25
    <text><text class="text1">业务宗号</text><text class="text2">20200101101510</text></text>
    
    这样可以吧?
    
    2020-03-25
    有用 3
    回复
  • 睡前原谅一切
    睡前原谅一切
    2020-03-25
    <view class="box">
      <text></text>
      <text></text>
    </view>
    
    .box {
      width: 100%;
      display: flex;
      just-content: space-between;
    }
    
    .box text:nth-of-type(1) {
      color: blue
    }
    .box text:nth-of-type(2) {
      color: red
    }
    
    2020-03-25
    有用 2
    回复
  • Listen
    Listen
    2020-03-25
    <text><text style="color:#333;">业务宗号</text><text style="color:red;">20200101101510</text></text>
    
    2020-03-25
    有用
    回复
登录 后发表内容
问题标签