html - HTML CSS:侧页组件
解决方案
Bootstrap 中没有特定的 CSS 组件可以与您的图像匹配,但您可以使用 Bootstrap 中的一些 CSS 样式。你可以试试这个并根据你的要求更改标题侧的 CSS
<!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.3.1/css/bootstrap.min.css">
</head>
<body>
<div class="container-fluid">
<div class="row" style="height: 100px;" >
<div class="col-md-2" style="background-color:lavender;">
<img src="img.png" class="align-self-center mr-3"style="position: absolute;top: 50%; left: 50%; transform: translate(-50%, -50%);"></div>
<div class="col-md-2" style="background-color: #b3b2b2;text-align: center;">
<p style="position: absolute;top: 50%; left: 50%; transform: translate(-50%, -50%);">title<p/></div>
</div>
</div>
</body>
</html>
推荐阅读
- flutter - Flutter 有两个 SliverPersistentHeader 一个接一个堆叠
- html - 更新 VSCode html 制表符间距
- python - 我将 permission_required 设置为“is_staff”,但出现错误 403 权限被拒绝
- python - 更改桌面屏幕方向
- excel - 在本地复制工作表数据是否比将单元格链接到外部文件更适合内存消耗
- spring - Curl Spring 复杂对象为空
- google-drive-api - Google Drive API:列出共享驱动器下的所有文件夹
- c# - 在 C++ 中将 .bmp 图像大小调整为 1280X720
- javascript - JsonResponse 和 HTTPResponse 有什么区别?
- python - DuckDuckGo 在使用 Python 请求时返回 418