是否可以为 <ons-bottom-toobar> 定义自定义修饰符?
Is possible to define a custom modifier for an <ons-bottom-toobar>?
我正在尝试为 "ons-bottom-toolbar" 定义一个自定义 "modifier" 属性,以便修改它的默认高度值 (44px)。
正如 Onsen 网页上定义的那样,"ons-bottom-toolbar" 具有该属性,如果您想为名为 "ons-yyyy" 的温泉元素创建一个名为 "xxxx" 的修饰符,您有将 css class 定义为:
.yyyy--xxxx {
/* define style here ...
*/
}
其中 class 名称是没有 "ons-" 后缀、“--”和修饰符名称的温泉元素。
我可以为 "ons-button":
<ons-button modifier="green">GREEN BUTTON</ons-button>
.button--green {
background-color: green;
}
...但是对于 "ons-bottom-toolbar" 不起作用:
<ons-bottom-toolbar modifier="pink">
PINK FOOTER????
</ons-bottom-toolbar>
.bottom-toolbar--pink{
height: 24px;
background-color: pink;
border-top: 5px solid black;
}
你可以看这里http://codepen.io/anon/pen/MaxNNb
¿有什么想法吗?
尝试使用 .bottom-bar--pink
代替 css 中的 .bottom-toolbar--pink
选择器。应该是bug吧。
我正在尝试为 "ons-bottom-toolbar" 定义一个自定义 "modifier" 属性,以便修改它的默认高度值 (44px)。
正如 Onsen 网页上定义的那样,"ons-bottom-toolbar" 具有该属性,如果您想为名为 "ons-yyyy" 的温泉元素创建一个名为 "xxxx" 的修饰符,您有将 css class 定义为:
.yyyy--xxxx {
/* define style here ...
*/
}
其中 class 名称是没有 "ons-" 后缀、“--”和修饰符名称的温泉元素。
我可以为 "ons-button":
<ons-button modifier="green">GREEN BUTTON</ons-button>
.button--green {
background-color: green;
}
...但是对于 "ons-bottom-toolbar" 不起作用:
<ons-bottom-toolbar modifier="pink">
PINK FOOTER????
</ons-bottom-toolbar>
.bottom-toolbar--pink{
height: 24px;
background-color: pink;
border-top: 5px solid black;
}
你可以看这里http://codepen.io/anon/pen/MaxNNb
¿有什么想法吗?
尝试使用 .bottom-bar--pink
代替 css 中的 .bottom-toolbar--pink
选择器。应该是bug吧。