我有一个组件来渲染一些产品,无论是移动视图和桌面视图都有不同的风格。我根据桌面和移动视图 在移动视图上,我必须显示一个 问题:如果不向div
的css显示属性display:none;
和display:block;
更改的要求,在行
,里面会显示两个产品,所以我将其编码如下。<!-- MOBILE ONLY PRODUCT DISPLAY COMPONENT-->
<v-row class="mobile_product_view ">
<v-col cols="6">aa</v-col>
<v-col cols="6">bb</v-col>
</v-row>
/* CSS large mobile size */
@media screen and (min-width: 425px) {
.mobile_product_view {
display: block;
}
}
分配class=“mobile_product_view”
属性,它将显示所需的列。当我分配class属性时,列显示在另一列下面。我想要的是cols应该是完全显示的一半col-aa和col-bb
应该放在一行中
我用下面的代码解决了这个问题
<v-card class="mobile_product_view">
<v-row class="m-0 ">
<v-col cols="6">aa</v-col>
<v-col cols="6">bb</v-col>
</v-row>
</v-card>