【问题标题】:how to overlay images and still have a responsive site?如何覆盖图像并仍然拥有响应式网站?
【发布时间】:2017-05-21 14:27:09
【问题描述】:

我需要将一些图像叠加在一起,并且仍然保持响应式网站。 我已成功覆盖所需的图像。但是当我将浏览器缩小时,图像没有响应..这是因为我使用了绝对标签吗?

有什么想法吗? This is the sample site

【问题讨论】:

  • 老实说,为什么我的问题被否决了?我有一个实际问题......人们有什么问题?

标签: html css responsive-design responsive


【解决方案1】:

您必须将图像的实际宽度设置为百分比:

.carousel-inner>.item>a>img, .carousel-inner>.item>img, .img-responsive, .thumbnail a>img, .thumbnail>img {
  display: block;
  max-width: 100%;
  height: auto;
  width: 100%;
}

【讨论】:

  • 似乎放大了,但没有缩小。
  • 现在它似乎工作了,由于某种原因我的 chrome 窗口不会调整大小。我重新启动了chrome,它很好。即使没有图像的宽度,它也可以工作。谢谢
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2020-06-25
  • 2019-10-20
  • 1970-01-01
  • 2015-10-15
  • 2014-03-03
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多