如何在<pre> in bootstrap

时间:2016-03-16 11:32:54

标签: html css twitter-bootstrap twitter-bootstrap-3 pre

I am using HTML's <pre></pre> to render my text as is with \n and spaces in a block. But bootstrap's default behaviour puts a <pre> block in a bordered box with a grey background. I don't want that. I want it to displayed as plain text.

How to disable that styling behavior for pre?

1 个答案:

答案 0 :(得分:10)

你可以这样做:

pre {border: 0; background-color: transparent;}

检查此Vanilla CSS Un-Reset以获取其他属性的默认值。