\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[x11names, svgnames]{xcolor}
\usepackage{mdframed}
\usepackage{graphicx}
\usepackage{fourier-orns}
\definecolor{warningColor}{named}{Red3}
\newcommand{\warningSymbol}{\raisebox{\depth}{\danger}}
\newenvironment{Warning}{%
\bigskip
\begin{mdframed}[%
topline=false,%
rightline=false,%
bottomline=false,%
innertopmargin=0.4em,%
innerbottommargin=0.4em,%
innerrightmargin=0.7em,%
rightmargin=0.7em,%
innerleftmargin=0.7em,%
leftmargin=0.7em,%
linewidth=.2em,%
linecolor=warningColor%
]
\color{warningColor}
}{%
\end{mdframed}%
\bigskip
}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\begin{Warning}
\lipsum
\end{Warning}
\lipsum[1]
\end{document}

效果图:上面的例子有个问题:当段落超过了一页,就发现这个例子就会出现了问题,上面的标识显示不正常。 解决上面的问题,可以使用如下的方式:

\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[x11names, svgnames]{xcolor}
\usepackage[framemethod=tikz]{mdframed}
\usetikzlibrary{calc}
\usepackage{fourier-orns}
\definecolor{warningColor}{named}{Red3}
\tikzset{
warningsymbol/.style={
rectangle,
draw=warningColor,
fill=white,
scale=1,
overlay}
}
\mdfdefinestyle{warning}{%
hidealllines=true,leftline=true,
skipabove=12,skipbelow=12pt,
innertopmargin=0.4em,%
innerbottommargin=0.4em,%
innerrightmargin=0.7em,%
rightmargin=0.7em,%
innerleftmargin=1.7em,%
leftmargin=0.7em,%
middlelinewidth=.2em,%
linecolor=warningColor,%
fontcolor=warningColor,%
firstextra={\path let \p1=(P), \p2=(O) in ($(\x2,0)+0.5*(0,\y1)$)
node[warningsymbol] {\danger};},%
secondextra={\path let \p1=(P), \p2=(O) in ($(\x2,0)+0.5*(0,\y1)$)
node[warningsymbol] {\danger};},%
middleextra={\path let \p1=(P), \p2=(O) in ($(\x2,0)+0.5*(0,\y1)$)
node[warningsymbol] {\danger};},%
singleextra={\path let \p1=(P), \p2=(O) in ($(\x2,0)+0.5*(0,\y1)$)
node[warningsymbol] {\danger};},%
}
\newmdenv[style=warning]{Warning}
\usepackage{lipsum}
\begin{document}
\begin{Warning}
\lipsum[1]
\end{Warning}
\lipsum[1]
\begin{Warning}
\lipsum\lipsum[1]
\end{Warning}
\lipsum[1]
\end{document}

效果图:选自:http://tex.stackexchange.com/questions/52023/mdframed-put-something-on-the-start-of-one-vertical-left-rule