Warning: getimagesize(): open_basedir restriction in effect. File(/etc/pki/tls/certs/ca-bundle.crt) is not within the allowed path(s): (/www/wwwroot/rinvay.cc/:/tmp/) in /www/wwwroot/rinvay.cc/usr/plugins/AMP/Action.php on line 469

Warning: failed loading cafile stream: `/etc/pki/tls/certs/ca-bundle.crt' in /www/wwwroot/rinvay.cc/usr/plugins/AMP/Action.php on line 469

Warning: getimagesize(): Failed to enable crypto in /www/wwwroot/rinvay.cc/usr/plugins/AMP/Action.php on line 469

Warning: getimagesize(https://www.rinvay.cc/usr/uploads/2018/06/1043322423.png): failed to open stream: operation failed in /www/wwwroot/rinvay.cc/usr/plugins/AMP/Action.php on line 469
CSS中修复主题图片自动居中且印象emoji

Rinvay.H Blog

CSS中修复主题图片自动居中且印象emoji

修复主题图片总是居中

修复主题图片总是居中无法使用emoji

问题原因

由于原主题创建时为了让图片更加统一使用display属性block将图片定义为一个带换行符的快详情查看所以解决这个问题很简单:直接不控制显示就行了,之余图如何控制我一会再说。

修改如下

.post-content img {
    position: relative;
    /* display: block; */
    overflow: hidden;
    max-width: 100%;
    height: auto;
    margin: 0 auto
}

.post-content p img {
    position: relative;
    #display: block;
    overflow: hidden;
    max-width: 100%;
    height: auto;
    /* margin: 20px auto */
    margin: auto
}

效果展示

:bowtie:
:wink:

:bowtie: :wink:

图片居中

接下来就是图片居中,其实也很简单

<div align=center>
<img src="https://www.rinvay.cc/youblog/1.png" />
</div>

示例

当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »