2016-02-10 25 views
0

我具有以下JSF組件:從h中取出2個垂直和頂部邊界:inputText的

<h:inputText value="#{TestComponent.hmspatient.surname}" label="Surname" styleClass="textbox" style="border:none;"/> 

我想顯示只有底部邊界(水平),並刪除所有其他3.當我使用border:none它刪除所有邊界。

回答

2

做這樣

span { 
 
    border-width: 0 0 1px 0; 
 
    border-style: solid; 
 
    border-color: red; 
 
} 
 

 
input { 
 
    border-width: 0 0 2px 0; 
 
}
<span>Heyyy</span><br> 
 
<input type="text" value="Heyyy" >

1

您可以單獨刪除每個邊界:

style="border-top:none; border-left:none; border-right:none;" 

,並且將離開底部邊框的默認樣式。

,或者,如果您要明確指定底部邊框樣式,你可以這樣做:

style="border:none; border-bottom:5px solid blue;" 
相關問題