代码
\documentclass{article}
\usepackage[skins]{tcolorbox}
\begin{document}
\begin{tcolorbox}[title={This is the title.}, colback=white, colframe=black, colbacktitle=white!80!gray, coltitle=black, sharp corners]
This is the first row.
\tcblower
This is the second row.
\tcbline
This is the third row.
\tcbline
This is the fourth row.
\end{tcolorbox}
\end{document}
效果
说明
- 好像必须要导入skins才能实现阴影
\usepackage[skins]{tcolorbox}
- 文本框设置参数
\begin{tcolorbox}[title={This is the title.}, colback=white, colframe=black, colbacktitle=white!80!gray, coltitle=black, sharp corners]
title:标题栏题目
colback:文本框背景颜色
colframe:文本框线条颜色
colbacktitle:标题栏背景颜色,这里设置为white!80!gray,效果如上所示,还挺好看的
coltitle:标题栏字体颜色?
sharp corners:方框类型
3.文本框内线条
\tcblower:第一行下方的虚线
\tcbline:其他行下方的虚线(注意:最后一行没有)