在這瀏覽器的戰國時代,各家Browser不同調情況下,業主又要求各家瀏覽器視覺統一,所以苦的還是前端的設計師們。
css hack幫我們解決了難題,網路上一堆語法但可解決得卻寥寥無幾,在這裡整理最全的caa hack一覽表,幫各位從事網頁設計的你們輕鬆解決ie6,ie7,ie8,ie9,firefox,chrome,opera,safari所帶來的不方便,而輕鬆作案賺大錢。
<!DOCTYPE html>
<html>
<head>
<title>Css Hack For All Browser</title>
<style>
#test
{
idth:400px;
height:400px;
background-color:blue; /*firefox*/
background-color:red\9; /*all ie*/
background-color:yellow\0; /*ie8*/
+background-color:pink; /*ie7*/
_background-color:orange; /*ie6*/
}
:root #test { background-color:purple\9; } /*ie9*/
@media all and (min-width:0px) /*opera*/
{
#test {background-color:black\0;}
}
@media screen and (-webkit-min-device-pixel-ratio:0) /*chrome and safari*/
{
#test {background-color:gray;}
}
</style>
</head>
<body>
<div id="test">test</div>
</body>
</html>

0 Response to "最全的css hack(ie6-9,firefox,chrome,opera,safari)"
張貼留言