小编Fat*_*a.S的帖子

如何使用透明背景创建bootstrap模式

我有一个模态问题,它显示黑色背景而不是透明.这可能是与CSS相关的问题.注意:我在类.fade中更改了Opacity:.7,但这并没有影响任何内容

  <!-- Modal -->
    <div class="modal fade" id="myModal"  style="position:fixed; top:0px; left:800px;width:600px; background:none; " role="dialog">
    <div class="modal-dialog">

      <!-- Modal content-->
      <div class="modal-content">
        <div class="modal-header">

          <button type="button" class="close" data-dismiss="modal">&times;</button>
          <h4 class="modal-title">Adding Wall</h4>
        </div>
        <div class="modal-body">
            <label>Wall Id:     </label><input type="text" id="wallNametxt"/><br>
         <label>Wall Name:</label><input type="text" id="wallNametxt1"/>

        </div>
        <div class="modal-footer">
          <input type="button" id="btn" value="Add!" name="save" class="btn btn-default"/>
          <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        </div>
      </div>

    </div>
  </div><!--End of Modal-->
Run Code Online (Sandbox Code Playgroud)

单击以查看输出

更新!! 它工作得很好.但是模态被放置在具有相同页面高度的玻璃盒中.我可以将其限制为高度,宽度属性,但我更愿意知道原因. 点击查看输出

html css twitter-bootstrap

5
推荐指数
1
解决办法
2万
查看次数

标签 统计

css ×1

html ×1

twitter-bootstrap ×1