Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想以这样一种方式放置上传的图像,如果图像大小小于容器 div,它会保持其原始大小,但如果图像大小大于容器 div,那么它适合 div,我必须提供宽度和图像的高度,否则 jquery.resizable 将不起作用。有什么可能的方法吗?
您可以使用最大高度和最大宽度。
.imgClass{ max-height: container-height; max-width: container-width; }