This list-style-image positioning problem is also often asked. The solution is generally to use li background simulation. The relative positioning method can also be used here.
<!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" xml:lang="zh"> <head profile="http://www.w3.org/2000/08/w3c-synd/#"> <meta http-equiv="content-language" content="zh-cn" /> <meta http-equiv="content-type" content="text/html;charset=gb2312" /> <title>blueidea</title> <style type="text/css"> li { list-style:url("http://bbs.blueidea.com/attachments/2006/11/10/arrowb_kJrcZheJmiIF.gif"); } li a { position:relative; top:-5px; font:12px/25px 宋体; } </style> </head> <body> <ul> <li><a href="#">web标准常见问题大全</a></li> <li><a href="#">web标准常见问题大全</a></li> <li><a href="#">web标准常见问题大全</a></li> <li><a href="#">web标准常见问题大全</a></li> <li><a href="#">web标准常见问题大全</a></li> </ul> </body> </html>
The above is the detailed content of List-style-image in css cannot be accurately positioned through background simulation or relative positioning of li.. For more information, please follow other related articles on the PHP Chinese website!