bootstrap模式没有按照我的要求显示

时间:2016-11-14 05:08:05

标签: javascript jquery html css twitter-bootstrap

我的自举模式在模态的顶部和底部出现蓝线。我不知道为什么蓝线出现在模态的顶部和底部。我想删除蓝线。如果我犯了任何语法错误或拼写错误,我的英语很弱,请向我道歉。

HTML CODE:

  <div class="modal fade bs-example-modal-sm vcenter" id="deleteconfirmation" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
  <div class="modal-dialog modal-sm" role="document">
    <div class="modal-content">
    <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
      <h4 class="modal-title" style="text-align:center">Are you sure you want to Delete it?</h4>
    </div>
    <div class="modal-body">
      <div class="form-group" style="text-align:center">
        <h6>By clicking on Yes button your ad will be Delete.</h6>
      </div>
    </div>
    <div class="modal-footer" style="text-align:center">
      <button type="button" class="btn btn-default" data-dismiss="modal">No</button>
      <button type="button" class="btn btn-primary" id="sayyes">Yes</button>
    </div>
    </div>
  </div>
  </div>

CSS代码:

.vcenter{
  position: relative;
  top: 50%;
  transform: translateY(-50%);
}

IMAGE: look of my modal

2 个答案:

答案 0 :(得分:1)

只需将此样式style="outline: none !important"添加到主div。

<div class="modal fade bs-example-modal-sm vcenter" id="deleteconfirmation" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" style="outline: none !important">

蓝线将消失。

答案 1 :(得分:0)

可能你已经超越了一些风格,

    <div class="container">
        <h3>Modal Example</h3>   
        <div>
            <a href="#myModal1" role="button" class="btn" data-toggle="modal">Launch Modal</a>
        </div>       
        <div id="myModal1" class="modal hide" tabindex="-1" role="dialog">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h3>Standard Selectpickers</h3>
            </div>
            <div class="modal-body">
            </div>
            <div class="modal-footer">
                <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
                <button class="btn btn-primary">Save changes</button>
            </div>
        </div>
    </div>
<style>

<强> DEMO