详解:38 tab-size

2020-10-28 12:22:14 浏览数 (1)

代码语言:javascript复制
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<link rel="stylesheet" type="text/css" href="css/reset.css"/>
	<style type="text/css">
	.test1{
		-moz-tab-size:4;tab-size:4;/*明白了,默认是八个,设置成四个了*/
	}
	.test2{
		-moz-tab-size:16;tab-size:16;/*16个空格,建议火狐里面看,兼容了呀*/
	}
	</style>
</head>
<body>
	<pre>with no tab
	with 1 tab
		with 2 tab
	</pre>
	<pre class='test1'>with no tab
	with 1 tab
		with 2 tab
	</pre>
	<pre class='test2'>with no tab
	with 1 tab
		with 2 tab
	</pre>
</body>
</html>

0 人点赞