2017-10-14 48 views
-1

我需要顯示下拉列表的文本作爲輕..下面是我的代碼:CSS文本顯示較輕

<div> 
       @Html.DropDownList("ChangeStatus", Model.GetAllStatus().OrderBy(l => l.Text), "-- Change --") 
       <button class="btn primary-bg" style="margin-right: 30px;" title="Status Change" onclick="ChangeMultiStatus(); return false;">Multi-Status</button> 
     </div> 

下面是我和我的預期。

enter image description here

回答

0

嘗試通過增加opacity: 0.6;你的風格標籤增加一些透明度。

<div> 
    @Html.DropDownList("ChangeStatus", Model.GetAllStatus().OrderBy(l => l.Text), "-- Change --") 
    <button class="btn primary-bg" style="margin-right: 30px; opacity: 0.6;" title="Status Change" onclick="ChangeMultiStatus(); return false;">Multi-Status</button> 
</div> 

根據需要更改不透明度值。

+0

我不想更改我的.css文件如何在上面的代碼中的dorpdownlist中添加樣式。 –

+0

你不需要。您在代碼段中使用內聯樣式。看到我更新的答案。 – colincr

+0

@GagandeepSinghRandhawa請考慮接受答案,如果它幫助你 – colincr

0

要麼你可以給顏色(首選)或不透明的CSS特定的下拉元素。