CSS hacks
?? CSS hacks ????? ??????? ?????? ???? ??? CSS ?????? ??? ????? ????? ?? ??????????????? ???????????? ??????? ??? CSS ?? ?????? ???? ???? ?? ?????? ?? ???????? ?????? ?????????? ???? ???????? ???? ??????? ?? ????? ???? browsers.
???? ?????????????? ?? ??????????? ??? ?? hacks ??????? ??? Internet Explorer 6 ??? ??? ?????????? ???????? ???. ? IE ????? ?? ??????? ? browser ??? ????????? ?? ??????????? ?????????? ??? Web design ??? ????? ??? ??????????.
?? ???????? hacks ????? ????? ??? ??????? ?? ??????????? ?????? ??? ?? ????? ????????? ???? ?? ??????? ??? ????? ???? ?????? ?????? ??? CSS hacks.
To !important hack
#nav {
border: 1px solid #ccc; !important;
border: 1px solid #ccc;
}
To hack ???? ?? ????? ?? ?? ???????? ??? ??6 (??? ??? ?????????? ???????? ???) ?? ???????????? ??????????? properties ?? ??? ??????. ??????? ? ?? ?? ???????? ?? ??????? ???? ??? ?? border, ??? ??? ???? ?????????? browsers ?? ??????????? ?? !important.
??? ?? ?????? ??? ? ?????? ?? ?????????? ?? “dotted” ?? “dashed” ??? ????? ?? border ?? ???????? ??????, ?? ?? hack ???? ???? ??? ?? border ??? ??? ?? ?? ????? solid ??????.
??? ???? ????? ?????? ??? ??? ??7.
To star hack
a:hover {
border: 1px dotted #ccc;
}
* html a:hover {
border: 1px solid #ccc;
}
? ??? ???? ??????? ?????? ??? ?????? ??? ?? star hack ??? ?????????. ???? ??????? ????????? ???? ??? ??? ?????? ???????? ??? ??.
????, ???? ??? ???? ??????????? ?????????, ?? dotted border ?? ??????? ????????? ??? ??? ??.
To hack chÂild selector
html>body{
background: url(back.png);
}
???? ?? hack ?????? ??? ??? IE6 (??? ??? ?????????? ???????? ???) ??? ?????? back.png.
???? ????????? ???? ??? child selector “>” ?o ????? ?? ??????? ????????? ??? ??? ??, ??? ?? ????? browsers ?? ????????????? ??? ????????? ????? ???? ??? ?????? ??? ?????????. O IE7 ?????? ???????????? ?? child selector.
?? ???????? ?? ????? ???? ??????? ?? ?? back.png ???? ??? ???????? ??????, ??? ?? ??????? ?? ??????? .png ?????? ?????? ?? ???????? ????????? ??? ??? ??.
To hack attribute selector
div[id="content"] {
background: url(back.png);
}
???? ??? ????, ??? hack ??????? ?? attribute selector “[id=”...”]”, ?? ????? ??? ????????????? ?? ?????? ???????? ??? IE ?? ?????????? ?? ?? ?????????? ??????? ??? ????? ??? ?????? ? ?????? ?? ?? ????????.
???? ????? ?????? ????????????? ??? ??????????? ??? Internet Explorer ????? ?? Conditional Comments ??? ????? ?????????? ???? ?????????. ??? ????? ?? ?? ??? ? ??? ???? ????? ???????? ??? ??? ????, ???? ??? ??????? ? ?????? ?????? ????? ?? ??????? ??? ??????? ??? hacks.