[讨论]代码题 - css解析器
将css源码解析进一个容器里面,容器自定义。css样例如下:<STYLE type=text/css>
<!--
TD {FONT-SIZE: 12px; LINE-HEIGHT: 150%}
INPUT {FONT-SIZE: 12px; LINE-HEIGHT: 150%}
SELECT {FONT-SIZE: 12px; LINE-HEIGHT: 150%}
A:link {COLOR: #000000}
A:visited {COLOR: #000000}
A:active {COLOR: #000000}
A:hover {COLOR: #ff0000}
.right_txt {FONT-SIZE: 12px; COLOR: #00446f; LINE-HEIGHT: 150%}
A.right_txt:link {COLOR: #00446f}
A.right_txt:visited {COLOR: #00446f}
A.right_txt:active {COLOR: #00446f}
A.right_txt:hover {COLOR: #ff0000}
.right_txt2 {FONT-SIZE: 12px; COLOR: #9e4300; LINE-HEIGHT: 150%}
A.right_txt2:link {COLOR: #9e4300}
A.right_txt2:visited {COLOR: #9e4300}
A.right_txt2:active {COLOR: #9e4300}
A.right_txt2:hover {COLOR: #ff0000}
.corr_txt2 {FONT-SIZE: 12px; COLOR: #003dd8; LINE-HEIGHT: 160%}
A.corr_txt2:link {COLOR: #003dd8}
A.corr_txt2:visited {COLOR: #003dd8}
A.corr_txt2:active {COLOR: #003dd8}
A.corr_txt2:hover {COLOR: #ff0000}
.corr_txt {FONT-SIZE: 14px; COLOR: #003dd8; LINE-HEIGHT: 160%}
A.corr_txt:link {COLOR: #003dd8}
A.corr_txt:visited {COLOR: #003dd8}
A.corr_txt:active {COLOR: #003dd8}
A.corr_txt:hover {COLOR: #ff0000}
.14p16h {FONT-SIZE: 14px; LINE-HEIGHT: 160%}
.24p {FONT-SIZE: 24px}
.underline {COLOR: #000000}
A.underline:link {COLOR: #000000; TEXT-DECORATION: none}
A.underline:visited {COLOR: #000000; TEXT-DECORATION: none}
A.underline:hover {COLOR: #ff0000; TEXT-DECORATION: underline}
.pic {BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid}
.pic2 {BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid; BORDER-BOTTOM: #ffffff 1px solid}
.search_bg {BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none}
.tb1 {
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-style: none;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-top-color: FF6908;
border-right-color: FF6908;
border-bottom-color: FF6908;
border-left-color: FF6908;
}
//-->
</STYLE>
奖品是版主飞吻一个,一星期后公布答案……