目标:
我使用Bootstrap 4,目前,我的卡仅在一行上。我阅读了文档,尝试了很多代码。目前,我不明白为什么我的卡太小而不尊重128px的大小。结果是相同的网格系统响应。
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<title>Hello</title>
</head>
<body class="text-center">
<div id='main-content' class="card-deck" style="margin: 50px 0 0 0">
<div class="card mb-4" style="max-width: 128px; max-width: 128px">
<a href="https://www.netflix.com/fr/"><img src="https://cdn1.iconfinder.com/data/icons/metro-ui-dock-icon-set--icons-by-dakirby/256/Netflix.png" alt="" class="card-img-top"></a>
</div><span></span>
<div class="card mb-4" style="width: 128px; height: 128px">
<a href="https://www.hulu.com"><img src="https://apprecs.com/ios-meta/app-icons/256/376510438.jpg" alt="" class="card-img-top"></a>
</div><span></span>
<div class="card mb-4" style="width: 128px; height: 128px">
<a href="https://www.hulu.com"><img src="https://apprecs.com/ios-meta/app-icons/256/376510438.jpg" alt="" …
Run Code Online (Sandbox Code Playgroud)