【发布时间】:2019-02-10 03:28:00
【问题描述】:
我正在使用 VueJs 和 Boostrap4 创建一个组件,我想在其中使用 bootstrap 提供的类获得与此类似的设计
阅读文档,bootstrap 提供了定制的 h-75 和 h-25 类,我认为这已经足够了,但我没有得到想要的结果
Vue.component('listcontent', {
template: '<div class="w-100 h-75 bg-info">ds</div>'
})
Vue.component('datashared', {
template: ' <div class="w-100 h-25 bg-primary">dsadsa</div>'
})
Vue.component('maincomponent', {
template: `<div class="container h-100" >
<div class="row h-100">
<div class="col-md-5 h-100 border">
<listcontent></listcontent>
<datashared/></datashared>
</div>
</div>
</div>`
})
new Vue({ el: '#app'});
html,body {
height: 100% !important;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.17/dist/vue.js"></script>
<div id="app">
<maincomponent></maincomponent>
</div>
我做错了什么?我怎样才能达到预期的效果?
【问题讨论】:
标签: html css vue.js bootstrap-4