Bootstrap 4 .card-link 类
使用 card-link 类可以为卡片中的任何链接添加鼠标悬停效果和蓝色。
下文是代码段,展示了 Bootstrap 4 中使用 card-link 类实现悬停效果的三条链接−
<a href="#" class="card-link"> Website Development </a> <a href="#" class="card-link"> App Development (iOS) </a> <a href="#" class="card-link"> App Development (Android) </a>
尝试以下代码,实现 card-link 类 −
示例
<!DOCTYPE html> <html lang="en"> <head> <title>Bootstrap Example</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/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/4.1.0/js/bootstrap.min.js"></script> </head> <body> <div class="container"> <h2>Services</h2> <div class="card"> <div class="card-body"> <h4 class="card-title">Company</h4> <p class="card-text">We provide the following tech development services:</p> <a href="#" class="card-link">Website Development</a> <a href="#" class="card-link">App Development (iOS)</a> <a href="#" class="card-link">App Development (Android)</a> </div> </div> </div> </body> </html>
Advertisement