<!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=utf-8" /> <title>前端設計</title> <style type="text/CSS"> body { margin: 200px auto; } a { width: 130px; height: 130px; margin: auto; outline: none; display: block; text-indent: -10000px; -webkit-box-shadow: 0 0 8px 1px rgba(0,0,0,.2); -webkit-border-radius: 90px; -moz-box-shadow: 0 0 8px 1px rgba(0,0,0,.2); -moz-border-radius: 90px; box-shadow: 0 0 8px 1px rgba(0,0,0,.2); border-radius: 90px; } a:hover { -webkit-box-shadow:0 0 8px 1px rgba(0,0,0,.2),inset 0 0 20px 6px rgba(0,0,0,.1); -moz-box-shadow:0 0 8px 1px rgba(0,0,0,.2),inset 0 0 20px 6px rgba(0,0,0,.1); box-shadow:0 0 8px 1px rgba(0,0,0,.2),inset 0 0 20px 6px rgba(0,0,0,.1); } a:active { -webkit-box-shadow:0 0 8px 1px rgba(0,0,0,.2),inset 0 0 20px 6px rgba(0,0,0,.2); -moz-box-shadow:0 0 8px 1px rgba(0,0,0,.2),inset 0 0 20px 6px rgba(0,0,0,.2); box-shadow:0 0 8px 1px rgba(0,0,0,.2),inset 0 0 20px 6px rgba(0,0,0,.2); } </style> </head> <body> <div > <a href="http://www.webskys.com" target="_blank">前端設計</a> </div> </body> </Html>
怎麼樣,神奇吧,總之學習css3就得忘記忘記以前我們的無賴辦法,遇見什麼情況先想想用CSS3能否實現,如果不能,那我們再用以前的辦法,只有這樣才能更好、更快的學好CSS3。