![cellcolor 在多列的右侧留下空白](https://linux22.com/image/463270/cellcolor%20%E5%9C%A8%E5%A4%9A%E5%88%97%E7%9A%84%E5%8F%B3%E4%BE%A7%E7%95%99%E4%B8%8B%E7%A9%BA%E7%99%BD.png)
代码:
\documentclass[11pt]{article}
\usepackage{xcolor}
\usepackage{array}
\usepackage{colortbl}
\usepackage{multirow}
\usepackage{makecell}
\renewcommand\arraystretch{1.5}
\begin{document}
\begin{center}
\begin{tabular}{|>{\columncolor[gray]{0.9}\raggedleft\arraybackslash}m{6cm}|>{\centering\arraybackslash}m{6cm}|}
\hline
\multicolumn{2}{|m{12cm}|}{\cellcolor{cyan!40}\Large\textbf{The
quick brown fox jumps over the lazy dog. The quick brown fox
jumps over the lazy dog}}\\\hline
First & Value 1\\\hline
Second & Value 2\\\hline
Third & Value 3\\\hline
\end{tabular}
\end{center}
\end{document}
问题是我无法消除右边的空白:
答案1
您的多列跨度不如其跨越的列宽,颜色只是使其更清晰
使用\multicolumn{2}{|m{\dimexpr 12cm+2\tabcolsep+\arrayrulewidth }|}
,以便它跨越柱间材料