我是创建Wordpress模板的新手(我主要是前端开发人员), 并且已经创建了一个显示特色图片的模板。无论出于何种原因, 它都会在图像下方显示空白。边距和填充设置为0, 所以这对我来说是一个很大的谜。这是我的模板代码:
echo '<div class="featured-image">';
the_post_thumbnail();
echo '</div>';
它是这样显示的:下方带有空白的图像
如果你可以看到该站点, 则为:https://staging.orangesocks.org/this-is-my-story/
#1
找到了答案。由于图像是行内元素, 因此在下面添加了空白。在图像上添加display:block解决了该问题。
来源:
https://www.srcmini02.com/65130.html
微信公众号
手机浏览(小程序)
Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57
Warning: get_headers(): Failed to enable crypto in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57
Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_41081.jpg): failed to open stream: operation failed in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57