我知道 foundation 有 interchange 功能,它可以在不同的断点下使用小图来替换大图,但是我想要像 bootstrap 的 img-responsive 那样重新调整图片的大小。
我知道 foundation 有 interchange 功能,它可以在不同的断点下使用小图来替换大图,但是我想要像 bootstrap 的 img-responsive 那样重新调整图片的大小。
你可以使用以下样式创建新的 .img-responsive 类,并直接应用到你的代码中。这将使图片按比例缩放以适应父元素。
您可以使用以下样式创建新的 .img-responsive 类,并直接应用到您的代码中。这将使图像按比例缩放以适应其父元素。.img-responsive {
display: block;
max-width: 100%;
height: auto;
}
bootstrap .img-responsive 是一个带有以下属性的 bootstrap 类
display: block;
max-width: 100%;
height: auto;
因此,您可以使用相同的属性创建自己的定制版。