css定义a标签文本大小_CSS标签大小

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.

我喜欢这个属性,因为它在代码繁重的博客中特别有用,尽管除此之外它并没有太多用处。

翻译自: https://davidwalsh.name/tab-size

css定义a标签文本大小

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值