收藏
回答

小程序中webview对多行超出省略号支持有问题?

https://developers.weixin.qq.com/s/9qrdoCmf7esE

第一行就出现了省略号


webview代码如下

<!doctype html>


<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">


  <title>css问题</title>
  <meta name="description" content="A simple HTML5 Template for new projects.">
  <meta name="author" content="SitePoint">


  <meta property="og:title" content="A Basic HTML5 Template">
  <meta property="og:type" content="website">
  <meta property="og:url" content="https://www.sitepoint.com/a-basic-html5-template/">
  <meta property="og:description" content="A simple HTML5 Template for new projects.">
  <meta property="og:image" content="image.png">


  <link rel="icon" href="/favicon.ico">
  <link rel="icon" href="/favicon.svg" type="image/svg+xml">
  <link rel="apple-touch-icon" href="/apple-touch-icon.png">


  <link rel="stylesheet" href="css/styles.css?v=1.0">
  <style>
    html,body{
        font-size: 50px;
    }
    .test{
      font-size: 0.34rem;
      color: #000;
      font-weight: 600;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
      -ms-text-overflow: ellipsis;
      text-overflow: ellipsis;
      overflow: hidden;
      word-break: break-word;
      line-height: 0.48rem;
      text-align: justify;
      word-break: break-all;
      word-wrap: break-word;
      white-space: pre-line;
    }
  </style>
</head>


<body>
    <div class="test"><span style="color: #ff8429;">【有奖互动】</span>你能接受自己的孩子变得<span style="color: #ff8429;">平庸</span>吗?你能接受自己的孩子变得</div>
</body>
</html>


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

1 个回答

登录 后发表内容