css,解决文字与图片对齐的问题
程序员文章站
2023-11-17 15:27:52
测试代码: ......
测试代码:
<!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>