2015-12-10 23 views

回答

0

所以這是有點尷尬,但你可以深入到陰影dom滾動到滾動條。 警告: Polymer組件的陰影不保證在版本之間不會改變。因此,從鮑爾更新paper-textarea可能會打破這一點。

paper-textarea/deep/ paper-input-container/deep/ iron-autogrow-textarea/deep/ div textarea::-webkit-scrollbar{ 
    background-color: blue; 
    width: 100px; 
} 

Demo Here (type in a few lines in the paper textarea)

編輯 大點的意見。/deep /正在消失,所以這是保證將來打破。我不清楚如何在沒有專門用於滾動條的mixin的情況下進行設計(這似乎很可能不是因爲它只有webkit風格)。

不管怎麼說,你可以使用一個iron-autogrow-textarea,而不是paper-textarea因爲它看起來像你不使用任何的「紙」款式paper-textarea。這樣,選擇器會稍微麻煩一些,因爲您不必鑽通paper-textareapaper-input-container

+0

我假設這也將使用'iron-autogrow-textarea'沒有'paper-textarea'的情況?我在GitHub上打開了這個問題 - https://github.com/PolymerElements/iron-autogrow-textarea/issues/60 –

+0

/deep /將被棄用,請參閱https://blog.polymer-project.org/通知/ 2015/12/01 /貶低深/ –

相關問題