我有一个简单的问题,但无法解决。我在网上搜索并阅读了大量不同的内容,但没有找到模态窗口的情况,也没有在我的情况下工作。
我做了一个非常轻的灯箱来打开图像和其他一些元素 我希望图像适合模态并调整他的宽度/高度并保持比例。
也许我有点迷失了自己
height:100%
这是 fiddle :http://jsfiddle.net/vrsap3hh/8/
一个想法?
感谢和问候。
编辑:这里有 2 个屏幕截图 我有什么:http://hpics.li/5c32814 我想要什么:http://hpics.li/0ba4e07
图片可以是任意大小,纵向或横向。
最佳答案
试试这个
#editor .main
{
padding: 0; //changed this
max-width: 1580px;
margin: 0 auto;
}
#editor .main > header h1 {
font-size: 25px;
line-height: 44px;
margin: 0;
/* font-weight: 700; */
color: #333;
float: left;
width: 100%;
margin-bottom: 0px; //changed this
}
关于javascript - 如何使图像高度适合模态 div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32156474/