简体   繁体   English

如何隐藏轮播图像调整大小时创建的黑色空间?

[英]How to hide the black space created during carousel image resizing?

In my website , i have placed an image after the navigation bar. 我的网站中 ,我已将图像放置在导航栏之后。 What i expect is the image re-size itself according to the size of the screen. 我所期望的是,图像会根据屏幕的大小自动调整大小。 Actually it does re-size but it leaves a blank space above the image when it re sizes which looks award. 实际上,它确实会调整大小,但是当调整大小时,它会在图像上方留出空白,看起来很不错。

The image fits exactly when the scrren resolution is above 1170px. 当scrren分辨率高于1170px时,图像完全适合。 But when i re-size it to lower resolutions it tends to introduce the blank space. 但是,当我将其调整为较低的分辨率时,往往会引入空白。

I have tried many element styles like margin-top: auto, margin-bottom:auto etc. But i couldn't hide that space dynamically. 我尝试了许多元素样式,例如margin-top:自动,margin-bottom:auto等。但是我无法动态隐藏该空间。 I am so new to the web site development. 我是网站开发的新手。 please help me to fix this issue. 请帮助我解决此问题。

change the style: 改变风格:

.carousel_gallery_item_inner { vertical-align:bottom;}

to: 至:

.carousel_gallery_item_inner { vertical:align:top;}

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

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