2016-07-27 42 views
1

我在一個項目中使用的Materialise Materialise的排除的風格,但我不希望它在這個特別的選擇元素:如何從一個元素

<select>    
    <option value="Male">m</option>    
    <option value="Female">f</option> 
</select> 

我認爲,解決這個問題是唯一的出路製作我自己的風格並將其應用於元素,但由於Materialize是新的,也許有一個更簡單的解決方案。

順便說一下,我使用Symfony3,並且在type.php文件中添加的每個組件都使用Materialize呈現出色,但ChoiceType除外。所以這就是爲什麼我想排除select元素的物化風格。 這是代碼:

$opcionesLibreDeTalco = array(
    'label' => 'Libre de talco', 
    'choices' => array(
     'm' => 'Male', 
     'f' => 'Female' 
    ) 
); 

回答

1

由於Materialise的0.97.7的,有沒有辦法排除的元素,因爲他們的CSS選擇也很廣泛,沒有例外。

例如,他們SCSS樣子:

 
select { 
    background-color: $select-background; 
    width: 100%; 
    padding: $select-padding; 
    border: $select-border; 
    border-radius: $select-radius; 
    height: $input-height; 
} 

你只需要手動覆蓋Materialise的款式。

相關問題