2014-11-05 72 views

回答

2

Famo.us此時並未創建任何特殊的僞元素樣式助手。 Famo.us支持通過Surface對象的setProperties更改樣式。

版本0.3.0中的曲面也支持屬性選項。添加placeholder的屬性,如下面的代碼所示。

Example of working code here

var surface = new InputSurface({ 
    size: [200, true], 
    content: '', 
    attributes: { 
     placeholder: 'Enter Something' 
    } 
    }); 

您也可以使用setAttributes方法:

var surface = new InputSurface({ 
    size: [200, true], 
    content: '' 
    }); 

    surface.setAttributes({ placeholder: 'Enter Something'}); 
    surface.setProperties({borderColor:'red'}); 
+0

看了你的問題太猛,我將相對於編輯到造型的'僞CSS' – talves 2014-11-06 19:40:56