2013-10-02 71 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); 
}