\hfill 的垂直等效项

\hfill 的垂直等效项

\hfill垂直间距是否有等效项?

答案1

你试过了\vfill吗 ?

如果页面上只有一件事,有时你需要放入“不可见”的对象才能使其工作:

\documentclass{minimal}

\begin{document}

% An invisible object that \vfill can push to the top of the page
\hbox{}\vfill

% Your content
blah blah blah

% Another object that \vfill can push to the bottom of the page
\vfill\hbox{}

\end{document}

答案2

\documentclass{minimal}

\begin{document}
\vspace*{\fill}% the star version for the beginning of a page

Without a star the command is ignored

\vfill% an abbreviation for \vspace{\fill}
bar

\newpage
baz
\end{document}

相关内容