我发布的图像显示了我编写的代码。并不是因为代码的长度为7000行,而是div如下所示。
当一个框变长(例如星期一)时,它会随之升高其他所有div,例如周六和周日。我希望网格浮到顶部。 任何帮助将不胜感激。
`<div class="container">
<div class="row">
<div class="col-sm">
mondays
</div>
<div class="col-sm">
tuesdays </div>
<div class="col-sm">
wedsdays
</div>
ECT.
</div>
</div>`
答案 0 :(得分:0)
您使用哪个Bootstrap版本?
你做了正确的事情
grid documentation。
请尝试使用数字网格。它应该像import { Component } from '@angular/core';
import { AngularFirestore, AngularFirestoreCollection } from 'angularfire2/firestore';
import { Observable} from 'rxjs';
import { map } from 'rxjs/operators';
import { StudentsInfo } from '../studentInfo';
@Component({
selector: 'app-delete-student',
templateUrl: './delete-student.component.html',
styleUrls: ['./delete-student.component.css']
})
export class DeleteStudentComponent {
public itemsCollection: AngularFirestoreCollection<StudentsInfo>;
public items: Observable<StudentsInfo[]>;
constructor(private db: AngularFirestore) {
this.itemsCollection = this.db.collection<StudentsInfo>('/Stud_Info');
//this.items = this.itemsCollection.valueChanges();
// .snapshotChanges() returns a DocumentChangeAction[], which contains
// a lot of information about "what happened" with each change. If you want to
// get the data and the id use the map operator.
this.items = this.itemsCollection.snapshotChanges().pipe(
map(changes => changes.map(a => {
const data = a.payload.doc.data() as StudentsInfo;
const id = a.payload.doc.id;
return { id, ...data}
})
));
}
// Deleting a Student from Firestore
public deleteStudent(docId:string) {
this.itemsCollection.doc(docId).delete();
}
}
或col-sm-3
。