样式选择标记 [英] style select tag

查看:82
本文介绍了样式选择标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



是否可以设置下拉菜单中的元素样式< select>

< option>< / option> < /选择>标签?

感谢您的帮助。

Rolf

解决方案

Rolf Brauser schreef:< blockquote class =post_quotes>
是否可以从下拉菜单中选择元素< select>
< option>< / option> < /选择>标签?




是。

< head>

< style type =" text / css" ;>

<! -

..listheader {

颜色:#FFFFFF;

背景:#000000;

}

..listdata {

颜色:#000000;

背景:#FFFF66 ;

}

- >

< / style>

< / head>

< body>

< form action ="" method =" get">

< select>

<选择的选项>世界啤酒< / option>

< ; option class =" listheader"> Campbelltown< / option>

< option class =" listdata"> - Springbank 21岁。< / option>

< option class =" listdata"> - Springbank 15年。< / option>

< option class =" listdata"> - Springbank 12年。 < / option>

< option class =" listdata"> - Glen Scotia< / option>

< option class =" listheader"> Highland< / option>

< option class =" listdata"> ; - Royal Lochnager Selected Reserve< / option>

< option class =" listdata"> - 奥本14岁< / option>

< option class =" listdata"> - 锁定Dhu Black 10年。 < / option>

< option class =" listdata"> - Highland Park 12年。< / option>

< option class =" listdata"> - Glenmorangie 1971年复古。 < / option>

< / select>

< / form>

< / body>

-

Edwin van der Vaart
http ://www.semi-conductor.nl/ 与半导体网站的链接
http://www.evandervaart.nl/ 正在建设中


>是。

< head>
< style type =" text / css">
<! -
.listheader {
颜色:#FFFFFF;
背景:#000000;
}
.listdata {
颜色:#000000;
背景:#FFFF66;
}




嗨Edwin,

谢谢你们的好看,但不是我的意思。是否可以

为边框,箭头和其他滚动条元素着色?

Rolf

2004年10月5日星期二17:39:06 +0200,Rolf Brauser< fa ****** @ a1.net>写道:

是。
< head>
< style type =" text / css">
<! -
.listheader {
颜色:#FFFFFF;
背景:#000000;
}
.listdata {
颜色:#000000;
背景:#FFFF66;
}



Edwin,
谢谢你的好石头,但不是我的意思。是否可以
为边框,箭头和其他滚动条元素着色?
Rolf




这些是操作系统并不是很聪明,即使你可以使用

。一些研究表明,当这些因素很难被识别出来时,可用性会降低。


Hi,
is it possible to style the elements from an dropdownmenue <select>
<option></option> </select> tag ?
Thanks for any help.
Rolf

解决方案

Rolf Brauser schreef:

Hi,
is it possible to style the elements from an dropdownmenue <select>
<option></option> </select> tag ?



Yes.
<head>
<style type="text/css">
<!--
..listheader {
color: #FFFFFF;
background: #000000;
}
..listdata {
color: #000000;
background: #FFFF66;
}
-->
</style>
</head>
<body>
<form action="" method="get">
<select>
<option selected>Beers of the World</option>
<option class="listheader">Campbelltown</option>
<option class="listdata"> - Springbank 21 yr.</option>
<option class="listdata"> - Springbank 15 yr.</option>
<option class="listdata"> - Springbank 12 yr. </option>
<option class="listdata"> - Glen Scotia </option>
<option class="listheader">Highland</option>
<option class="listdata"> - Royal Lochnager Selected Reserve </option>
<option class="listdata"> - Oban 14 yr. </option>
<option class="listdata"> - Lock Dhu Black 10 yr. </option>
<option class="listdata"> - Highland Park 12 yr.</option>
<option class="listdata"> - Glenmorangie 1971 Vintage. </option>
</select>
</form>
</body>
--
Edwin van der Vaart
http://www.semi-conductor.nl/ Links to Semiconductors sites
http://www.evandervaart.nl/ Under construction


> Yes.

<head>
<style type="text/css">
<!--
.listheader {
color: #FFFFFF;
background: #000000;
}
.listdata {
color: #000000;
background: #FFFF66;
}



Hi Edwin,
Thanks that rocks nice, but isnt exactly what I meant. Is it also possible
to color the border, the arrow, and the other scrollbar elements?
Rolf


On Tue, 5 Oct 2004 17:39:06 +0200, Rolf Brauser <fa******@a1.net> wrote:

Yes.
<head>
<style type="text/css">
<!--
.listheader {
color: #FFFFFF;
background: #000000;
}
.listdata {
color: #000000;
background: #FFFF66;
}



Hi Edwin,
Thanks that rocks nice, but isnt exactly what I meant. Is it also
possible
to color the border, the arrow, and the other scrollbar elements?
Rolf



Those are part of the OS and aren''t really smart to mess with even where
you can. Some studies have shown decreased usability when these arenm''t
easily recognized.


这篇关于样式选择标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆