2017-03-09 57 views
2

我試圖製作一個表格,但是我試圖在項目具有焦點時更改高亮顏色(請參見圖片)。我試過在我的Sass中使用這行代碼,這是我在Ionic文檔中找到的,但它似乎不起作用。有誰知道這是如何工作的?Ionic 2輸入高亮

$text-input-md-highlight-color: #000000; 

I suppose the highlight-color should change the text-color and the bottom-border-color

+1

你在哪裏重寫變量?在variable.scss中? –

+0

不,我把它寫在我的腳印上,修好了,謝謝!但它似乎只會改變底部的線條。 –

+0

好的..但它將是一個全球變化的變量.scss –

回答

4

您需要在此改變SASS在variable.scss文件爲它生效。 查看更多here。 地說:

$text-input-md-highlight-color: #000000; 
src/theme/variable.scss

+0

你的回答救救我 – core114

0

試試這個:

<div class="container"> 

    <h2>Design in CSS3<small>Inputs</small></h2> 

    <form> 

    <div class="group">  
     <input type="text" required> 
     <span class="highlight"></span> 
     <span class="bar"></span> 
     <label>Name</label> 
    </div> 

    <div class="group">  
     <input type="text" required> 
     <span class="highlight"></span> 
     <span class="bar"></span> 
     <label>Email</label> 
    </div> 

    </form> 



</div> 

DEMO HERE