调整 Tumblr 照片大小并居中 post
Resize and center Tumblr photo post
我一直在尝试将照片 post 中的图像调整到最大宽度,但似乎无法确定代码。我也无法将图像居中...有什么提示吗?
我当前照片的代码 post:
{block:Photo}
<div class="photo">
<div align="center"> {LinkOpenTag}<img src="{PhotoURL-HighRes}" alt="{PhotoAlt} width="600"/>{LinkCloseTag}</center>
{block:Caption}
<div class="caption" align="center"> {Caption}</div>
{/block:Caption}
{block:More} <a href="{Permalink}" class="button" align="center">{lang:Read more}</a> {/block:More}
</div>
{/block:Photo}
在 css 中尝试此操作(您需要在模板中的第 361 行附近找到此代码块):
div.post div.photo img {
border-width: 0px;
position: center;
max-width: 100%;
width: 100%;
height: auto;
}
这应该会重置硬编码图像大小属性,但您需要对其进行测试
我一直在尝试将照片 post 中的图像调整到最大宽度,但似乎无法确定代码。我也无法将图像居中...有什么提示吗?
我当前照片的代码 post:
{block:Photo}
<div class="photo">
<div align="center"> {LinkOpenTag}<img src="{PhotoURL-HighRes}" alt="{PhotoAlt} width="600"/>{LinkCloseTag}</center>
{block:Caption}
<div class="caption" align="center"> {Caption}</div>
{/block:Caption}
{block:More} <a href="{Permalink}" class="button" align="center">{lang:Read more}</a> {/block:More}
</div>
{/block:Photo}
在 css 中尝试此操作(您需要在模板中的第 361 行附近找到此代码块):
div.post div.photo img {
border-width: 0px;
position: center;
max-width: 100%;
width: 100%;
height: auto;
}
这应该会重置硬编码图像大小属性,但您需要对其进行测试