skl

  IT博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  18 随笔 :: 1 文章 :: 7 评论 :: 0 Trackbacks
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>如何让select的样式也漂亮起来</title>
<style type="text/css">
<!--
.select * {
  margin: 0;
  padding: 0;
}
.select {
  border:1px solid #cccccc;
  float: left;
  display: inline;
  }
.select div {
  border:1px solid #f9f9f9;
  float: left;
}
/* 子选择器,在FF等非IE浏览器中识别 */
.select>div {
  width:120px;
  height: 17px;
  overflow:hidden;
  }
 
/* 通配选择符,只在IE浏览器中识别 */
* html .select div select {
  display:block;
  float: left;
  margin: -2px;
}
.select div>select {
  display:block;
  width:124px;
  float:none;
  margin: -2px;
  padding: 0px;
}
.select:hover {
  border:1px solid #666666; //鼠标移上的效果
}
.select select>option {
  text-indent: 2px; //option在FF等非IE浏览器缩进2px
}
-->
</style>
</head>
<body><div class="select">
 <div>
 <select>
  <option>看见效果了吧</option>
  <option>看见效果了吧</option>
  <option>看见效果了吧</option>
 </select>
 </div>
</div>
</body>
</html>
posted on 2008-12-29 12:03 阅读(7653) 评论(5)  编辑 收藏 引用 所属分类: Div+CSS

评论

# re: 如何让select的样式也漂亮起来 2012-11-09 17:17 52brazil
狗屁效果!  回复  更多评论
  

# re: 如何让select的样式也漂亮起来 2013-06-03 13:02 ni
垃圾。  回复  更多评论
  

# re: 如何让select的样式也漂亮起来 2013-10-22 13:55 路人甲
狗屎  回复  更多评论
  

# re: 如何让select的样式也漂亮起来 2013-10-28 16:17 yu
这种效果还好意思拿出来??????伤不起。。。  回复  更多评论
  

# re: 如何让select的样式也漂亮起来 2013-11-01 13:19 33
laji  回复  更多评论
  

只有注册用户登录后才能发表评论。