bootstrap-4 - Bootstrap 4:两个图像叠加
解决方案
我试图通过查看图片来编写代码。这是我所做的。看看代码。我想我做了你想做的事..但即使没有,也请告诉我..
#image {
background: url('http://www.lefrancais.eu/files/2013/05/signature-contrat.jpg')
no-repeat center/cover;
margin: 0;
padding: 0;
width: 100%;
height: 95vh;
position: relative;
overflow: hidden;
z-index: -1;
}
#image-2 {
margin-top: -100px;
margin-bottom: -3.6%;
}
#image-2 img {
height: 100px;
width: 170px;
}
footer {
width: 100%;
height: 5vh;
background-color: #333;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO"
crossorigin="anonymous">
<link rel="stylesheet" type="text/css" media="screen" href="style.css" />
<script src="script.js"></script>
</head>
<body>
<div class="container">
<div class="container-fluid">
<div id="image">
<h2 class="display-6 text-center mt-5 text-light">Découvrez tous nos
programmes près de chez vous</h2>
</div>
<div id="image-2">
<img src="https://image.freepik.com/icones-gratuites/logo-de-pomme_318-40184.jpg" alt="">
</div>
</div>
</div>
<footer>
</footer>
</body>
</html>
推荐阅读
- angular - 如何使用 RxJs 定期抓取 REST API?
- ios - 当应用程序被杀死状态时,点击推送通知后无法导航到 ViewController
- javascript - 具有相同文本的多个值没有获得确切的选定文本偏移量
- python - 尽管有选项,但鼻子测试没有代码覆盖率
- git - 如何更改 BitBucket 上所有提交中的文件内容?
- bash - 使用 Platypus 创建可点击文件以运行 docker
- javascript - 如何将 id 添加到 the_post_thumbnail()?
- php - 在 smarty 项目 php 文件中使用 smarty 变量
- uwp - UWP 应用中的 Chromium
- html - 尝试在添加按钮单击时添加“选择文件并删除按钮”时的引导面板主体对齐问题