在浏览器调整大小

时间:2016-01-05 20:44:16

标签: javascript angularjs angular-strap

我使用以下代码在模态中使用制表符。

<div bs-tabs>
    <div ng-repeat="tabs in Filters" title="{{ tabs.title }}" name="{{ tabs.title }}" bs-pane>
        <label class="tag-checkboxes col-sm-6" ng-repeat="tag in tabs.filters | orderBy: 'name'">
            <input type="checkbox" ng-model="tag.checked" ng-change="ModifyFilter(tag)"> {{tag.name}}
            </input>
        </label>
    </div>
</div>

从这样的JSON源中提取数据:

{
    "title": "Difficulty",
    "icon": "difficulty-icon",
    "filters": [{
        "name": "Easy",
        "checked": false
    }]
},
{
    "title": "Equipment",
    "icon": "equipment-icon",
    "filters": [{
        "name": "Rope",
        "checked": false
    }
    }]
}

这在Chrome 47中非常有效,但是在Chrome 38中(由于关闭的网络而烦恼我必须定位的特定浏览器)标签的内容(所有复选框)在浏览器调整大小或我打开之前不会显示检查员,基本上我猜的任何改变dom的东西。

有谁知道如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

好的,这个问题也会导致模态中输入的问题。以下css解决了这个问题。

position: fixed;似乎打破了局面。

.modal.center .modal-dialog{
    position:absolute !important;
    top:40%;left:50%;
    min-width:320px;
    max-width:630px;
    width:50%;
    -webkit-transform:translateX(-50%) translateY(-50%);
    transform:translateX(-50%) translateY(-50%)
} 
相关问题