2017-03-09 59 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