[Bootstrap]印刷時のURL表示を削除

2014/05/21

Bootstrap(2.3.2)を利用していると、印刷時にaリンクのURLが表示される。

content属性を空にすることで、URLを非表示にできる。 [css] @media print { a[href]:after { content: "" !important; } abbr[title]:after { content: "" !important; } } [/css]

ちなみに、bootstrap.cssには以下の設定がされている。 [css] a[href]:after { content: " (" attr(href) ")"; } abbr[title]:after { content: " (" attr(title) ")"; } [/css]