角度ui模态在ie

时间:2014-03-17 06:21:02

标签: angularjs internet-explorer user-interface width

我在项目中使用角度ui模态。 与modal一样的整体功能在所有浏览器中都可以工作,即使在ie。我指定给模态体的宽度在chrome,mozilla和safari中工作得很好,但是它没有工作在ie(那个模态是通过屏幕扩展整个尺寸宽度)。 怎么做

这是我的html

<script type="text/ng-template" id="exitApp.html">

        <div class="modal-header" >
            <div class="row">
                    <div class="col-lg-12 col-md-12 col-sm-12- col-xs-12">
                        <div class="row" >
                            <div class="col-lg-2 col-md-3 col-sm-3 col-xs-3">

                                <span>
                                    <img class="img-responsive" src="images/ic_launcher.png" alt=""  height="91" width="101" style="margin-left:2%"> 
                                </span>
                            </div>

                            <div class="col-md-2 " "><span ><h2 >Appetite</h2></span></div> 
                        </div>  

                    </div>
                </div>
        </div>
        <div class="modal-body">
            <div class="ddpanel" style="margin-left:7%;" >
                    <h2 >Do you wish to exit from the application ?</h2>

            </div>
        </div>
        <div class="modal-footer">

            <button class="btn btn-primary"  ng-click="ok()">yes</button>
            <button class="btn btn-primary"  ng-click="cancel()">No</button>

        </div>
</script>

我刚刚根据我的要求更改了模态对话框宽度和其他一些样式

@media screen and (min-width: 768px) {
  .modal-dialog {
    width: 35%;
    margin: 30px auto;
  }
  .modal-content {
    -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);

        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  }
}

35%的宽度不适用于

还有其他任何可能使它在ie。

中有所不同

非常感谢任何帮助。

1 个答案:

答案 0 :(得分:0)

问题在于IE无法识别您的CSS媒体查询。这是另一篇可能对您有帮助的StackOverflow帖子:IE7, IE8 support for css3 media query