介紹
? ? ? 商品卡片,用于展示商品的圖片、價(jià)格等信息。
前言
? ? ? 官方文檔給出的配置項(xiàng)對(duì)大多數(shù)人來(lái)說(shuō)都太官方,這是官方給出的。
? ? ? 高級(jí)用法
? ? ? ? ? ? ? 可以通過(guò)插槽添加定制內(nèi)容。
?
問(wèn)題
? ? ? 在官方文檔中給出的示例配置中,你根本無(wú)法調(diào)整中部寬度。?
所以直接上方案
-
van-card__bottom:金額 / 虛擬價(jià)格 / 數(shù)量,那一塊容器。
-
van-card__img:圖像容器。
-
van-card__thumb:左側(cè)容器(圖像)文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-842919.html
代碼
/* 金額/虛擬價(jià)格 - 上浮 */
.van-card__bottom{
padding-bottom: 80rpx!important;
}
/* 調(diào)整圖像大小(最好用百分比) */
.van-card__img{
width: 55%!important;
height: 55%!important;
}
/* 調(diào)整左側(cè)圖像容器 - 使其貼近 */
.van-card__thumb{
margin-right:-44rpx!important;
}
最后希望可以幫助到大家哦!文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-842919.html
到了這里,關(guān)于微信小程序Vant Weapp-Card 商品卡片自定義修改樣式的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!