几天前我开始玩聚合物,到目前为止我理解它很好,但刚才我遇到了问题.我试图更改默认宽度,但我无法获得所需的结果.首先,我尝试仅使用这些更改来更改css中的宽度:
#navheader {
background-color: #56BA89;
}
core-drawer-panel .transition > #main{
left:100px!important;
}
core-drawer-panel .transition > #drawer{
width:100px!important;
}
core-drawer-panel .narrow-layout > #drawer:not(.core-selected){
width:100px!important;
}
这是html部分:
Menu
Title
If drawer is hidden, press button to display drawer.
它不想在没有!important的情况下覆盖默认样式.这就是我得到的:http://screencast.com/t/7AQHblQvk它看起来很好,直到它崩溃,像这样:http://screencast.com/t/oDg3ptLpp.然后我尝试更改core-drawer-panel.html内部的默认宽度,所以我修改了这部分代码:
/**
* Width of the drawer panel.
*
* @attribute drawerWidth
* @type string
* @default '256px'
*/
drawerWidth: '100px',
什么都没发生它没有改变元素的宽度,所以现在我没有关于如何实现这一点的想法和知识.有人可以帮忙吗?
提前致谢! 🙂