简体   繁体   English

4个具有文本叠加响应的相同图像

[英]4 same image with text overlay responsive

Im using boostrap4. 我正在使用boostrap4。 I need 4 boxes with or image as background of col. 我需要4个带有或图像的框作为col的背景。 Image always must be 100% height, and 100% width. 图片必须始终为100%高度和100%宽度。 Size of image = size of div All images are 1080 width / 488 height 图片大小= div大小所有图片均为1080宽/ 488高度

Its possibile to do? 它有可能做什么?

在此处输入图片说明

One thing you can do is set the images as background images and simply set the background-size: cover or background-size: contain . 您可以做的一件事是将图像设置为背景图像,然后简单地设置background-size: coverbackground-size: contain If you want to get fancy with it and have the boxes keep the aspect ratio of the image then you can play around with more advanced css tricks such as the aspect ratio box . 如果您想看中它并使框保持图像的长宽比,则可以尝试使用更高级的CSS技巧,例如长宽比框

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM