1
幹活這是我的HTML/CSS:鈣(100% - 300像素),在Safari上沒有的Firefox或Chrome
#all {
text-align: center;
}
.photo_img {
width: auto;
max-height: -webkit-calc(100% - 300px);
max-height: -moz-calc(100% - 300px);
max-height: calc(100% - 300px);
margin: 0;
padding: 0;
margin-top: 150px;
}
<div id="all">
<img src="http://40.media.tumblr.com/ed8f597aae5d145a51a13a7eaddac58e/tumblr_nlh3w0m4GS1u4c0gpo1_1280.jpg" class="photo_img">
</div>
我不知道爲什麼它僅適用於Safari瀏覽器。 你能幫我讓它跨瀏覽器嗎?
https://jsfiddle.net/q3fwavq5/