小编bak*_*nji的帖子

如何在 VS Code 中更改区域/末端区域的颜色?

有谁知道如何更改#region/#endregion 的颜色?这在 VS 社区中是灰色的,但在 VS Code 上不是。

先感谢您。

syntax customization visual-studio-code

3
推荐指数
1
解决办法
686
查看次数

如何在 Bootstrap 4 中的图像覆盖卡上垂直对齐?

我试图将 FontAwesome 图标置于图像覆盖卡的中心,但无法将其垂直居中。

我尝试了多种其他建议,例如使用d-flexandjustify-content-center但似乎都不起作用。我缺少什么?

<head>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css">
</head>

<body>
    <div class="card bg-dark text-white">
      <img class="card-img" src="http://placehold.jp/500x200.png" alt="Example">
      <div class="card-img-overlay text-center">
          <i class="fab fa-youtube fa-5x" style="color:#FF0000"></i>
      </div>
    </div>
</body>
Run Code Online (Sandbox Code Playgroud)

我希望图标位于图像中间居中,但只能水平对齐,不能垂直对齐。感谢您的帮助。

html css overlay vertical-alignment bootstrap-4

1
推荐指数
1
解决办法
7730
查看次数