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>
广告