Answers.Body: <p>Install control panel CSS plugin, and add the following style.</p>
  <pre><code>.field .heading{
    position: relative;
  }
  
  .field.tooltip-icon-append label:after{
      content: &quot;i&quot;;
      font-style: italic;
      font-family: open-sans;
      display: inline-block;
      position: relative!important;
      top: 0!important;
      left: 0!important;
      color: #fff;
      width: 17px;
      height: 17px;
      margin-top: 0;
      margin-left: 5px!important;
      line-height: 17px;
      font-size: 13px;
      background-color: rgba(0,135,255,.7);
      border-radius: 50%;
      text-align: center;
      opacity: 1;
      -webkit-font-smoothing: auto;
  }
  
  .field .heading .instructions {
      visibility: hidden;
      max-width: 100vw;
      background-color: #ddd;
      color: #000;
      border-radius: 6px;
      padding: 10px;
      position: absolute;
      z-index: 1000;
      bottom: 150%;
      width: 300px;
      opacity: 0;
      box-shadow: 0 0 0 1px rgba(205,216,228,.25), 0 2px 12px rgba(205,216,228,.5);
      transition: opacity .3s;
  }
  
  .field .instructions::after {
      content: &quot;&quot;;
      position: absolute;
      top: 100%;
      left: 25px;
      border-width: 10px;
      border-style: solid;
      border-color: #ddd transparent transparent;
  }
  
  .field .heading:hover .instructions {
    visibility: visible;
    opacity: 1;
  }
  </code></pre>
  <p>Install control panel JS plugin and add the following code.</p>
  <pre><code>    $(&quot;.field&gt;.heading&quot;).each(function(){
          var instruction = $(this).find(&quot;.instructions&quot;);
          if(instruction.length !== 0){
              $(this).parent().addClass(&quot;tooltip-icon-append&quot;);
          }
      });
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-25T04:57:40.570Z
Answers.LastActivityDate: 2020-06-25T04:57:40.570Z
Answers.UserDisplayName: Parry Huang
Body: <p>How to turn</p>
  <p><a href="https://i.sstatic.net/FBJeP.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/FBJeP.png" alt="enter image description here" /></a></p>
  <p>show as the following style</p>
  <p><a href="https://i.sstatic.net/UxZXM.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/UxZXM.png" alt="enter image description here" /></a></p>
  
Tags: <craft3><control-panel><field><css><field-instructions>
Title: How to make field instructions show as tooltip?
ThreadText: # How to make field instructions show as tooltip?
  
  (Asked by: username_0 on 2020-06-25)
  
  How to turn
  
  [![enter image description here](https://i.sstatic.net/FBJeP.png)](https://i.sstatic.net/FBJeP.png)
  
  show as the following style
  
  [![enter image description here](https://i.sstatic.net/UxZXM.png)](https://i.sstatic.net/UxZXM.png)
  
  **Tags:** craft3, control-panel, field, css, field-instructions
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2020-06-25. Score: 2
  
  Install control panel CSS plugin, and add the following style.
  
  ```
  .field .heading{
    position: relative;
  }
  
  .field.tooltip-icon-append label:after{
      content: "i";
      font-style: italic;
      font-family: open-sans;
      display: inline-block;
      position: relative!important;
      top: 0!important;
      left: 0!important;
      color: #fff;
      width: 17px;
      height: 17px;
      margin-top: 0;
      margin-left: 5px!important;
      line-height: 17px;
      font-size: 13px;
      background-color: rgba(0,135,255,.7);
      border-radius: 50%;
      text-align: center;
      opacity: 1;
      -webkit-font-smoothing: auto;
  }
  
  .field .heading .instructions {
      visibility: hidden;
      max-width: 100vw;
      background-color: #ddd;
      color: #000;
      border-radius: 6px;
      padding: 10px;
      position: absolute;
      z-index: 1000;
      bottom: 150%;
      width: 300px;
      opacity: 0;
      box-shadow: 0 0 0 1px rgba(205,216,228,.25), 0 2px 12px rgba(205,216,228,.5);
      transition: opacity .3s;
  }
  
  .field .instructions::after {
      content: "";
      position: absolute;
      top: 100%;
      left: 25px;
      border-width: 10px;
      border-style: solid;
      border-color: #ddd transparent transparent;
  }
  
  .field .heading:hover .instructions {
    visibility: visible;
    opacity: 1;
  }
  
  ```
  
  Install control panel JS plugin and add the following code.
  
  ```
      $(".field>.heading").each(function(){
          var instruction = $(this).find(".instructions");
          if(instruction.length !== 0){
              $(this).parent().addClass("tooltip-icon-append");
          }
      });
  
  ```
  
  
  ---
  
  