梦之都
CSS教程
,
CSS E[att=val] 属性值选择符
示例
梦之都红色字体
梦之都粉色字体
梦之都非粉色字体
表单的例子
用户名:
密码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>CSS E[att=val] 属性值选择符示例</title> <style type="text/css" media="all"> a[title="dreamdu"] { color:red; } *[title="dreamdu.com"][href="http://www.dreamdu.com/"] { color:pink; border: 1px solid blue; } input[type="text"] { background: green; color: white; border: 1px solid blue; } input[type="password"] { background: blue; color: white; border: 1px solid green; } span[title="dreamdu"][href="http://www.dreamdu.com/"] { color:blue; } </style> </head> <body> <a title="dreamdu">梦之都红色字体</a> <span href="http://www.dreamdu.com/" title="dreamdu.com">梦之都粉色字体</span> <span href="http://dreamdu.com/" title="dreamdu.com">梦之都非粉色字体</span> <h2>表单的例子</h2> <form id="dreamdu"> <label for="username">用户名:</label> <input type="text" id="username" name="username" value="dreamdu" size="15" maxlength="25" /> <label for="pass">密码:</label> <input type="password" id="pass" name="pass" size="15" maxlength="25" /> </form> </body> </html>