How to judge whether the text content of the pre tag is more than three lines

recently, I am doing a requirement. When the text content is more than three lines, it displays "expand" and displays an ellipsis. Click the expand button to switch to put away, but there is a problem, that is, I don"t know how to judge whether the text content is really more than three lines..

<div class="introduction">
        <span class="introduction_title"></span>
        <pre class="introduction_content" id="introduction_content">{{coachesDetailData.introduction}}
< / div > < div class= "case-block" > < div class= "introduction_btn" v show = "show" @ click= "changeStyle" > expand < / div > < div class= "introduction_btn" v show = "! show" @ click= "changeStyle" > put it away < / div > < / div >
changeStyle() {
      if (this.show == true) {
        this.show = false;
        document.getElementsByClassName(
          "introduction_content"
        )[0].style.cssText =
          "display: block;float: left;white-space: pre-line;text-align: left;margin-top: size(10);margin-left: size(15);line-height: size(23);font-size: size(14);letter-spacing: 0;color: -sharp888;";
      } else {
        this.show = true;
        document.getElementsByClassName(
          "introduction_content"
        )[0].style.cssText =
          "display: block;float: left;white-space: pre-line;text-align: left;margin-top: size(10);margin-left: size(15);line-height: size(23);font-size: size(14);letter-spacing: 0;color: -sharp888;display: -webkit-box;overflow: hidden;white-space: normal !important;text-overflow: ellipsis;word-wrap: break-word;-webkit-line-clamp: 3;-webkit-box-orient: vertical;";
      }
    }

Mar.18,2021

how to use the height? setting the size of the word should be able to control the height

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3651b-41045.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3651b-41045.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?