2010-04-27 71 views

Trả lời

10

đây là những gì bạn muốn Styling Dropdown Lists

<style type="text/css"> 
 
    option.red {background-color: #cc0000; font-weight: bold; font-size: 12px;} 
 
    option.pink {background-color: #ffcccc;} 
 
    </style> 
 

 
    <select name=colors> 
 
    <option class="red" value= "../getting_started/">Getting Started </option> 
 
    <option class="pink" value= "../getting_started/html_intro1.htm">- Intro to HTML 
 
    </option> 
 
    </select>

+0

gì nếu tôi điền vào danh sách thả xuống từ một danh sách theo cách này: '@Html. DropDownListFor (m => m.ModActionCatList, actionCatList, mới {@class = "select2-select-00 col-md-12 yêu cầu sửa toàn bộ chiều rộng" ... ' –

+0

Có thể ai đó có thể giúp xóa bỏ một số nhầm lẫn, tôi đã xem lên '