简体   繁体   English

如何使页面中的图像全宽

[英]How to make an image full width in page

Hi guys I want to put this part of my website with full width with CSS but I can't find a code that works in that part and I don't understand why.大家好,我想用 CSS 将我网站的这一部分全宽放在一起,但我找不到适用于该部分的代码,我不明白为什么。

我需要帮助的地方

What can I do to make this picture full width?我该怎么做才能使这张图片全宽?

Add this style添加此样式

  .banner_img {
    width: 100vw !important;
    margin-left: calc(-50vw + 50%);
   }

I found a way of doing what you want.我找到了一种做你想做的事的方法。

1- You need to "push" your other content down: 1-您需要“下推”您的其他内容:

参考

2- Apply those properties to your image: 2-将这些属性应用于您的图像:

参考

Hope it helps you.希望它可以帮助你。

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

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