所幸Google Chrome用的是与Safari一样的Webkit引擎,我们可以使用对safari相似的方式作css hack,写法为:
Example Source Code @media screen and (-webkit-min-device-pixel-ratio:0) {
Example Source Code
p.callout { color:#FF0000; font-weight:normal; }
p.callout { color:#000000; font-weight:bold; # } 接着我们测试下: CODE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css"> </head> <body> <div> </body> </html>
Example Source Code
Mozilla Firefox ( Gecko )
Internet Explorer ( Trident ) Opera ( Presto ) Konqueror ( KHTML ) Safari ( WebKit ) Google Chrome ( WebKit ) |
ps:以上是网上摘来的,我可能不太会用,我的做法是 body:nth-of-type(1) .add{left:615px; color:red;}