css,解决文字与图片对齐的问题
测试代码:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <style> .divs .imgs{ display: inline-block; vertical-align: middle; } .divs .infos{ display: inline-block; } </style> </head> <body> <div class="divs"> <div class="infos"><a href="">找回密码</a></div> <div class="imgs"><img src="../imgs/zdingwei01.jpg" width="25" height="25" alt=""></div> </div> </body> </html>