如何将我的目标元素保留在屏幕的bootstrap-tour中心而不是当前步骤?

时间:2016-11-21 02:04:34

标签: javascript twitter-bootstrap web bootstrap-tour

例如。这是当前网页的屏幕截图,其中一半目标元素在屏幕外。

enter image description here

在这个例子中,巡视中的当前步骤以屏幕为中心,但有没有一种方法可以在屏幕上显示(我的步骤和目标元素即内容),而不会删除我的内容?

   var tour = new Tour({
        storage: false
   });

   tour.addSteps([{
      element: "#TransferInfo",
      placement: "bottom",
      title: "Welcome to our landing page!",
      content: "Here is some basic information about this path to this degree program.",
  //    backdrop: true,
      backdropPadding: {
          left: -370,
          right: -370,
          bottom: 20
      },
    },
    {
      element: "#GenEdTable",
      placement: "bottom",
      title: "General Education Categories",
      content: "By clicking on these headers, you will see the equivalencies for the respective courses.  Complete one course per General Education category to get fulfill the university's General Education requirements.",
    //  backdrop: true,
      backdropPadding: {
          left: -370,
          right: -370,
          bottom: 40,
          top: 40
      },
    },
    {
      element: "#MajorTable",
      placement: "bottom",
      title: "Major Courses",
      content: "These give you equivalencies for courses you can take at your community college that directly go toward your major.",
  //    backdrop: true,
      backdropPadding: {
          left: -370,
          right: -370,
          bottom: 40,
          top: 40
      },
    }
  ]);

  tour.init();
  tour.start();

单击三个下拉表单,然后用户从数据库接收查询信息。因此,在最后一次和最后一次点击后立即开始游览。

0 个答案:

没有答案