2016-08-03 74 views
0

我在删除Nativescript-CardView插件中的按钮上的边框时遇到了一些困难。如何在Android中删除Nativescript CardView中的按钮边框?

enter image description here

HTML

<CardView #item elevation="50" margin="10"> 
    <GridLayout rows="auto, auto, auto" columns="*, *, *"> 
     <Image src="~/images/shop.jpg" stretch="aspectFit" colSpan="3" row="0" ></Image> 
     <Button text="&#xE88E;" class="Material btn" row="1" col="0" ></Button> 
     <Button text="&#xE8CC;" class="Material btn" row="1" col="1" ></Button> 
     <Button text="&#xE530;" class="Material btn" row="1" col="2" ></Button> 
    </GridLayout> 
</CardView> 

CSS

.btn { 
    font-size: 20; 
    margin:4; 
    border-color: transparent; 
    border: 0; 
    border-width: 0; 
    border-style: none; 
    background-color: transparent; 
    padding:5px; 
} 

回答

3

好吧,所以它没有什么相关的CardView。只需在Android 5.1(棒棒糖)上按钮+ 与您的课程一起尝试这两个规则,它就会起作用。您也不需要border-color: transparent

border-width: 0.1; background-color: transparent;

+1

border-width:0.1有窍门! – Misha