点击按钮区域,按钮大小不变的情况下,扩大热点区域的方法,不支持iee8。
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>扩大热点区域的方法,不支持iee8</title> <style type="text/css"> .test{width: 100px; height: 100px; border:10px dotted #000000; margin: 50px auto; padding:50px; } .t1{background: url("images/cake.png") center; background-clip:border-box;} .t2{background: url("images/cake.png") center; background-clip:padding-box;} .t3{background: url("images/cake.png") center; background-clip:content-box;} </style> </head> <body> <div class="test t1"></div> <div class="test t2"></div> <div class="test t3"></div> </body> </html>