ความสูงของหน้าต่างโมดอล Angular-UI

ฉันกำลังพยายามสร้างหน้าต่าง modal ด้วย angular-ui-0.6.0 และ bootstrap-3.0

เทมเพลตของฉันคือ:

<div class="modal-header">
    <h3>Create new entry</h3>
</div>

<div class="modal-body" ng-repeat="e in create_elements">
    <label>Test</label>
    <input class="form-control" style="height: 30px; width: 98%" type="text" required ng-model="e.model"></input>
    <label id="{{e.label}}" style="display: none; color: red;">{{e.label}} - can't be empty</label>
</div>

<div class="modal-footer">
    <button class="btn btn-success" ng-click="create(create_elements)">Create</button>
    <button class="btn btn-warning" ng-click="close()">Cancel</button>
</div>

CSS สำหรับกิริยา:

.modal { จอแสดงผล: บล็อก; }

หน้าต่างโมดอลเปิดได้ตามปกติ แต่ความสูงเกินความจำเป็น ฉันพยายามตั้งค่า height: auto สำหรับ .modal แต่ก็ไม่ได้ช่วยอะไร

ป้อนคำอธิบายรูปภาพที่นี่

เห็นจุดขาวๆ ใต้ footer ครับ จะลบยังไงครับ?

ขอบคุณ.!


person 0xAX    schedule 17.12.2013    source แหล่งที่มา


คำตอบ (1)


เพื่อลดความสูงของกล่องโต้ตอบ ฉันได้ทำสิ่งต่อไปนี้:

ใส่สิ่งนี้ลงในการกำหนดค่า modal.open เพื่อหลีกเลี่ยงการปะทะกับกล่องโต้ตอบอื่น

windowClass: 'your-modal-class',

จากนั้นใน css ของฉันฉันเพิ่มสิ่งนี้:

div.your-modal-class .modal-content {
    max-height: 600px;
    overflow: auto;
}
person Cameron    schedule 21.01.2014