Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2962025
  • 博文数量: 153
  • 博客积分: 8010
  • 博客等级: 中将
  • 技术积分: 1680
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-02 10:43
个人简介

IT精英-请移步http://www.ithtu.com

文章分类

全部博文(153)

文章存档

2011年(3)

2010年(5)

2009年(17)

2008年(20)

2007年(76)

2006年(32)

我的朋友

分类:

2007-08-24 17:34:47

在网上做有奖信息的时候,经常看见一些注册表单,只有一条线供你填写,就跟做考卷时的填空题一样,很Cool!

其实要做成这样的效果并不难,只需用一段很简短的CSS代码即可搞定!

< style type="text/css">
  < !--
  .xian{BORDER-LEFT-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-TOP-STYLE: none}
  -- >
  < /style>

其中代码的作用如下:

“BORDER-LEFT-STYLE:none”: 不显示左边框
  “BORDER-RIGHT-STYLE: none”: 不显示右边框
  “BORDER-TOP-STYLE: none”: 不显示上边框
  “BORDER-bottom-STYLE: none”: 不显示上边框,加上这条,什么边框也没有了

让我们一起来看一个应用实例吧:

< html>
  < head>
  < title>网上填空< /title>
  < style type="text/css">
  < !--
  .xian{BORDER-LEFT-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-TOP-STYLE: none ;}
  -- >
  < /style>< !--注:此段为css代码,在这里更改参数可以设置出更cool的效果-->
  < /head>
  < body bgcolor="#FFFFFF" text="#000000">
  隐藏你的边框
  < p>用户名:
  < input type="text" name="name" class=xian> < !--注:class=这条一定要加,设置你的css应用在表单里面-- >
  < /p>
  < /body>
  < /html>

实现的效果简洁清爽,怎么样,也改改你的表单吧!

阅读(342) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~