0

在此处输入图像描述

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

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

谢谢!

4

3 回答 3

1

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

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

尝试实施、使用和定制它们。

http://qtip2.com/demos

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

于 2017-04-14T06:18:20.957 回答
0

试试这个: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;
    }
于 2017-04-14T05:26:35.203 回答
0
  • 如果您使用的是引导程序,您可以通过此链接获取引导工具提示引导工具提示示例
    • 如果您不使用引导程序,那么您可以将此插件仅用于工具提示单击此处
于 2017-04-14T05:28:07.737 回答