![这种阴影效果如何应用于 mdframed 环境?](https://linux22.com/image/255045/%E8%BF%99%E7%A7%8D%E9%98%B4%E5%BD%B1%E6%95%88%E6%9E%9C%E5%A6%82%E4%BD%95%E5%BA%94%E7%94%A8%E4%BA%8E%20mdframed%20%E7%8E%AF%E5%A2%83%EF%BC%9F.png)
答案1
这是我只修改第一帧的建议:
\documentclass{article}
\usepackage{kantlipsum}
\usepackage[framemethod=tikz]{mdframed}
\usetikzlibrary{calc}
\mdfdefinestyle{fakesheet}{%
backgroundcolor=gray!15,
middlelinecolor=gray!15,
roundcorner=15pt,
singleextra={%
\fill[gray!60,rounded corners,]
($(P)+(0,-2.05)$) .. controls ($(P)+(0.14,-0.55)$) .. ($(P)+(0.16,-0.45)$) -- ($(P)+(-0.2,-0.4)$) -- cycle;
\draw[gray!15,line width=0.20cm] ($(P)+(-.1,-2.15)$) -- ($(P)+(-.1,-.4)$) ;
\path let \p1=(P), \p2=(O) in ({(\x1-\x2)/2},\y2) coordinate (M);
\shade[left color=gray!50,right color=gray!50,middle color=black!55,rounded corners]
($(M)+(-5.4,-0.135)$) .. controls ($(M)+(0,-0.015)$) .. ($(M)+(5.4,-0.135)$) -- ($(M)+(5.4,0.135)$) .. controls ($(M)+(0,0.135)$) .. ($(M)+(-5.4,0.135)$)-- cycle;
\draw[gray!15,line width=0.20cm] ($(M)+(-5.4,0.10)$) -- ($(M)+(5.4,0.1)$) ;
}
}
\newmdenv[style=fakesheet]{shadeenv}
\begin{document}
\kant[1]
\begin{shadeenv}
\kant[2]
\end{shadeenv}
\end{document}
可以通过选项singleextra
firstextra
等添加额外材料。例如请参见此处: