我尝试在干净的页面中运行基本示例。默认情况下,我的内容框位于右侧,而不是位于步骤按钮下方:

代码如下:
<html>
<head>
  <title>Demo</title>
  <script src="Scripts/jquery-1.10.2.js"></script>
  <script src="Scripts/jquery.steps.js"></script>
  <link href="Content/jquery.steps.css" rel="stylesheet" />
</head>
<body>
  <div id="wizard">
    <h1>First Step</h1>
    <div>First Content</div>
   <h1>Second Step</h1>
   <div>Second Content</div>
  </div>
    <script>
      $("#wizard").steps();
  </script>
</body>
</html>在外部内容div上设置了一个溢出,但是当我在使用一个非常简单的向导遇到问题时,我不太愿意深入研究这个问题。我希望文档中遗漏了必需的容器。
发布于 2015-08-01 03:30:10
我想通了。代码应用了一个clearfix类,但作者打算让您提供自己的类,或者忽略了将其包含在css中。我最终从他在github中的演示"main.css“中删除了它:
/*
 * Clearfix: contain floats
 *
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    `contenteditable` attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that receive the `clearfix` class.
 * 2. The use of `table` rather than `block` is only necessary if using
 *    `:before` to contain the top-margins of child elements.
 */
.clearfix:before,
.clearfix:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}
.clearfix:after {
    clear: both;
}
/*
 * For IE 6/7 only
 * Include this rule to trigger hasLayout and contain floats.
 */
.clearfix {
    *zoom: 1;
}https://raw.githubusercontent.com/rstaib/jquery-steps/master/demo/css/main.css
https://stackoverflow.com/questions/31753260
复制相似问题