css定义a标签文本大小
The ridiculous tabs vs. spaces debate within code can get just as heated as the JavaScript semi-colon debate. I'm a tab guy myself but to each their own...just don't work on a project with me if you aren't. Anyways, I was quite surprised to find that you can set the tab space number of <pre> element code with CSS's tab-size
property!
的 荒谬 代码中的制表符与空格辩论可能会像JavaScript分号辩论一样激烈 。 我本人是个标签专家,但对每个人来说…… 如果您不愿意,请不要与我一起进行项目 。 无论如何,我很惊讶地发现您可以使用CSS的tab-size
属性设置<pre>元素代码的标签空间数目!
CSS (The CSS)
The tab-size
property takes an integer value representing the number of spaces a tab represents:
tab-size
属性采用一个整数值,该整数值表示选项卡代表的空格数:
/* 4 spaces per tab */
pre {
tab-size: 4;
}
/* No indentation */
pre {
tab-size: 0;
}
As you can see, you could even remove indentation all together. Not recommended but possible.
如您所见,您甚至可以一起删除缩进。 不推荐,但可能。
I love this property as it's especially useful for code-heavy blogs, though it doesn't have much use outside of that.
我喜欢这个属性,因为它在代码繁重的博客中特别有用,尽管除此之外它并没有太多用处。
css定义a标签文本大小