input文字框樣式代碼執行個體_基礎教程

來源:互聯網
上載者:User
通過css來更改所有的form的樣式的方法,可以在css中定義
input{color:red}
textarea{border:1px solid #333}
這樣的格式,一般如果不需要更改所有的文本樣式,可以通過下面的方法來定義文字框和密碼框等樣式
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>建立網頁 1</title> <style> <!-- .username { width:130px; background:#FFFFFF url("/article/upimages/ico_username.gif") 2px 2px no-repeat; padding-left:18px;BORDER-RIGHT: #E7AD01 1px solid; BORDER-TOP: #E7AD01 1px solid; FONT-SIZE: 13px; BORDER-LEFT: #E7AD01 1px solid; COLOR: #000000; BORDER-BOTTOM: #E7AD01 1px solid; HEIGHT: 20px } --> </style> </head> <body> <table cellSpacing="0" cellPadding="0" width="100%" border="0" id="table1"> <tr> </tr> </table> </body> </html>
[Ctrl+A 全選 注:如需引入外部Js需重新整理才能執行]
  • 相關文章

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.