使用 Bootstrap 对齐媒体对象
bootstrapweb developmentcss framework
要对齐媒体对象,请使用 Bootstrap 中的 .align 类。您可以尝试运行以下代码来实现 .align 类。
使用 .align-left 类将媒体左对齐 −
示例
<!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <link rel = "stylesheet" href = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <script src = "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> </head> <body> <div class = "container"> <h2>Google Tag Manager Tutorial</h2> <div class = "media"> <div class = "media-left"> <img src = "https://www.cainiaomax.com/latest/Google-Tag-Manager.png" class="media-object" style="width:60px"> </div> <div class = "media-body"> <h4 class = "media-heading">Introduction</h4> <p>Google Tag Manager (GTM) is a free tool that makes it easy for marketers to add and update website tags.</p> </div> </div> </div> </body> </html>

