利用自己所学的CSS知识,今天我们来做一个看上去像文本的按钮吧。其实本身它还是一个Input,只是我们用CSS把它变为了文本,去掉了按钮原有的边框、颜色什么的,一切恢复如初了,通过本教程只是让CSS初学者学会CSS的使用,并不是让您去用这个按钮。 演示: <!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> <title>文本按钮,TextButton</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <style> body { font : 0.9em Arial, Helvetica, sans-serif; } .btn { background-color: transparent; border: none; padding: 0; } </style> </head> <body> <form method="post" action="http://www.veryhuo.com/indexs.html"> <p>CSS 美化修饰的文本按钮:</p> <p><input type="submit" name="btnSubmit" id="btnSubmit" value="文本按钮,点此 >>" class="btn" /></p> </form> </body> </html><br /><center>如不能显示效果,请按Ctrl+F5刷新本页,更多网页代码:<a href='http://www.veryhuo.com/' target='_blank'>http://www.veryhuo.com/</a></center>提示:可修改后代码再运行! 文章导航 用Css定义不同的鼠标光标指针样式代码使用fieldset标签结合CSS Lable实现表单的布局