Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/81.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 用于下拉列表文本的CSS_Html_Css - Fatal编程技术网

Html 用于下拉列表文本的CSS

Html 用于下拉列表文本的CSS,html,css,Html,Css,有没有办法只设置ASP.net下拉列表项的第一个单词的样式 例如: <asp:DropDownList ID="ddCategory" runat="server"> <asp:ListItem Value="0" Selected="True" Text=""></asp:ListItem> <asp:ListItem Value="1">**Other** (Something/Notething)</asp:ListIt

有没有办法只设置ASP.net下拉列表项的第一个单词的样式

例如:

<asp:DropDownList ID="ddCategory" runat="server">
    <asp:ListItem Value="0" Selected="True" Text=""></asp:ListItem>
    <asp:ListItem Value="1">**Other** (Something/Notething)</asp:ListItem>
    <asp:ListItem Value="2">**Life** (Love/Hate)</asp:ListItem>
    <asp:ListItem Value="3">**Companies** (Apple/Samsung)</asp:ListItem>
    <asp:ListItem Value="4">Cars (Toyota/Honda)</asp:ListItem>
    <asp:ListItem Value="5">Flowers (Roses/Lillies)</asp:ListItem>
    <asp:ListItem Value="6">Desires (Pitbull/Hotdog)</asp:ListItem>
</asp:DropDownList>

。上面没有和这个匹配的。我已尝试将所需的单词放入标记中。

可能重复您最好先显示生成的HTML,然后显示服务器标记。这些标记是动态生成的,如果不将所需的文本包装在一个范围内并使其粗体,则这是ASP.net。这是我提到的第一件事。我确实尝试过将所需的文本包装在span和b标记中。