bootstrap.css和IE11问题

时间:2015-06-29 16:13:35

标签: javascript angularjs html5 twitter-bootstrap-3

我正在使用bootstrap.css处理AngularJS应用。 Chrome中的一切看起来都不错,但我在firefox和IE11中都遇到了格式化问题。

HEAD

        <head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Application</title>

    <!-- Bootstrap Core CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="css/simple-sidebar.css" rel="stylesheet">


    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
     <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<script src= "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.16/angular.js"
</script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.16/angular-route.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.16/angular-resource.js"></script>
<script src="js/dirPagination.js"></script>
<script src="app/myAppAccounts.js"></script>
<base href="/">
</head>

它看起来像什么: enter image description here 有关修复此问题的任何提示吗?

修改

按钮请求HTML。这些是部分的。

   <div class="col-md-2">
      <input ng-model="dateFrom" type="date" class="form-control">
    </div>
     <div  class="col-md-2">
      <input ng-model="dateTo" type="date" class="form-control">
    </div>
    <div class="col-md-1">
      <button class="form-control" type="button" ng-click="searchByDate(dateFrom, dateTo)" > Search </button>
    </div>
    <div class="col-md-2"></div>
    <div class="col-md-3" >
        <input ng-model="orderID" class="form-control" type="text" placeholder="Search by order ID">

     </div>
    <div class="col-md-1">
       <button class="form-control" type="button" ng-click="searchByID()"> Search </button>
    </div>

1 个答案:

答案 0 :(得分:1)

我主要看到在尝试使用col-md-1 div中的内容时会发生这种情况。内容传统上超过容器的宽度,因此按钮的大小正确,但文本不会被截断,并显示溢出。

我修改了一些你的html,可能会更好一点:

Plnkr Here

enter image description here

<div class="col-md-12 ">
  <div class="col-md-6 text-left">
     <div class="col-md-4">
       <input ng-model="dateFrom" type="date" class="form-control"  placeholder="Start Date">  
     </div>
     <div class="col-md-4">
       <input ng-model="dateTo" type="date" class="form-control" placeholder="End Date">
     </div>
     <div class="col-md-4">
       <button class="form-control" type="button" ng-click="searchByDate(dateFrom, dateTo)" > Search </button>
     </div>
   </div>

   <div class="col-md-6 text-right">
     <div class="col-md-8" >
       <input ng-model="orderID" class="form-control" type="text" placeholder="Search by order ID">
     </div>
     <div class="col-md-4">
      <button class="form-control" type="button" ng-click="searchByID()"> Search </button>
     </div>
   </div>
</div>