【问题标题】:How to create interactive hints like this (example inside)如何创建这样的交互式提示(内部示例)
【发布时间】:2017-04-14 05:18:48
【问题描述】:

嗨,我需要创建交互式提示。我尝试使用“%”在其中创建 relative 块和位置提示(absolute)。但我做不到。

是否有任何插件,或者自己编写更简单?

谢谢!

【问题讨论】:

    标签: jquery html css tooltip hints


    【解决方案1】:

    搜索工具提示。在这种情况下,它们真的可以派上用场。

    网上有很多工具提示插件,例如:http://qtip2.com/

    尝试实现、使用和自定义它们。

    http://qtip2.com/demos

    上面的链接重定向到一个这样的页面,其中有一个图像,它可以让你专注于特定的图像部分,让工具提示弹出。

    【讨论】:

      【解决方案2】:

      试试这个:http://jsfiddle.net/mzd7maqq/114/

      .html

      <div id="container" class="col-lg-3">
              <div class="img-container">
                  <div class="positioning">
                      Some Text
                  </div>
                  <div class="positioningt">
                      Some Text
                 </div>
                  <img src="http://placehold.it/300x200/eeeeee" />
              </div>
          </div>
      

      .CSS

       .col-lg-3{
              width: 25%;
              min-width: 230px;
              float: left;
              position: relative;
              min-height: 1px;
              padding-left: 15px;
              padding-right: 15px;
              background-color: #aaa;
              text-align: center;
          }
          .col-lg-3 img {
              max-width: 100%;
          }
          .img-container {
              display: inline-block;
              position: relative;
          }
          .positioning{
            position: absolute;
            left: 35px;
            top: 22px;
            background-color: red;
            color: white;
            padding: 4px;
            font-size: 17px;
            line-height: 18px;
          }
          .positioningt{
            position: absolute;
            left: 55px;
            top: 60px;
            background-color: red;
            color: white;
            padding: 4px;
            font-size: 17px;
            line-height: 18px;
          }
      

      【讨论】:

        【解决方案3】:
        • 如果您正在使用引导程序,您可以通过此链接获取引导程序工具提示 bootstrap tooltip example
          • 如果您不使用引导程序,那么您可以将此插件仅用于工具提示click here

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 2019-11-20
          • 2011-01-23
          • 2022-01-09
          • 2019-08-14
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多