如何改变滚动条颜色?
你是不是这样写:
<!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>无标题文档</title> <style type="text/css"> body{ scrollbar-face-color: #f2f2f2; scrollbar-highlight-color: #ffffff; scrollbar-shadow-color: #999999; scrollbar-3dlight-color: #999999; scrollbar-arrow-color: #999999; scrollbar-track-color: #ff0000; scrollbar-darkshadow-color: #ffffff; } </style> </head> <body> </body> </html> 应该这样写:
<!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>无标题文档</title> <style type="text/css"> html,body{ scrollbar-face-color: #f2f2f2; scrollbar-highlight-color: #ffffff; scrollbar-shadow-color: #999999; scrollbar-3dlight-color: #999999; scrollbar-arrow-color: #999999; scrollbar-track-color: #ff0000; scrollbar-darkshadow-color: #ffffff; } </style> </head> <body> </body> </html> 因为:新的文档类型定义模型使用html 元素作为容器。
