【图表】tcolorbox包:定制彩色文本框

代码

\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}

效果

在这里插入图片描述

说明

  1. 好像必须要导入skins才能实现阴影

\usepackage[skins]{tcolorbox}

  1. 文本框设置参数

\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:其他行下方的虚线(注意:最后一行没有)

  • 11
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值