我将使用 Beetle HTML5 Template . 下载并在浏览器中查看后看起来不错,但是当我切换到 chrome 移动 View 时,标题不在 View 的中心。
原创于 http://themes.mokaine.com/beetle-html/home-01.html :
这里是下载的版本:
这是中心标题的 JS 部分:
pxImgCaption.each(function () {
var $this = $(this);
$this.css({
top: ((pxWrapper.height() + headerHeight / 2) - $this.outerHeight()) / 2
});
});
这里是完整的 JS 文件: http://themes.mokaine.com/beetle-html/js/beetle.js
最佳答案
如果你用 Chrome Inspector 检查 beetle wordpress,你会注意到他们正在添加
关于javascript - 垂直居中标题 - Beetle HTML5 模板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28499803/