2013-10-02 70 views
0

我创建了一个收藏夹,我希望把它响应仅适用于CSS ...CSS响应IMG火狐

在Firefox上的每个浏览器execpt的伟大工程(如近everytimes)....

我真的不知道什么是使CSS为Firefox响应IMG的方式......

这里我的CSS的小提琴例子:http://jsfiddle.net/qbtyD/7/

.light-box-container { 
    position: fixed; 
    display: table; 
    vertical-align: baseline; 
    width: 100%; 
    height: 100%; 
    top: 0; 
    left: 0; 
    margin: 0 auto; 
    padding: 0 auto; 
    background: rgba(0,0,0,0.8); 
    cursor: pointer; 
} 
.light-box-inner { 
    position: relative; 
    display: table-cell; 
    vertical-align: middle; 
    margin: 0 auto; 
    padding: 0 auto; 
} 
.light-box-image { 
    position: relative; 
    text-align: center; 
} 
.light-box-image img { 
    position: relative; 
    width: auto; 
    max-width: 80%; 
    height: auto; 
    max-height: 90%; 
    margin: 0 auto; 
    -webkit-border-radius: 3px; 
    -moz-border-radius: 3px; 
    border-radius: 3px; 
    -webkit-box-shadow: 0px 0px 40px rgba(0,0,0,0.8); 
    -moz-box-shadow: 0px 0px 40px rgba(0,0,0,0.8); 
    box-shadow: 0px 0px 40px rgba(0,0,0,0.8); 
} 

回答

0

我得到了它绝对像这样:http://jsfiddle.net/qbtyD/8/

.light-box-container { 
    position: fixed; 
    vertical-align: baseline; 
    width: 100%; 
    height: 100%; 
    top: 0; 
    left: 0; 
    margin: 0 auto; 
    padding: 0 auto; 
    background: rgba(0,0,0,0.8); 
    cursor: pointer; 
} 
.light-box-image { 
    position: relative; 
    height: 100%; 
    margin: 0 auto; 
    padding: 0 auto; 
    text-align: center; 
} 
.light-box-image img { 
    max-height: 90%; 
    max-width: 80%; 
    position: absolute; 
    top: 0; 
    bottom: 0; 
    left: 0; 
    right: 0; 
    margin: auto; 
    -webkit-border-radius: 3px; 
    -moz-border-radius: 3px; 
    border-radius: 3px; 
    -webkit-box-shadow: 0px 0px 40px rgba(0,0,0,0.8); 
    -moz-box-shadow: 0px 0px 40px rgba(0,0,0,0.8); 
    box-shadow: 0px 0px 40px rgba(0,0,0,0.8); 
}