居中标题

by 17khba

HTML

<div>浏览器兼容</div>

CSS

*{box-sizing: border-box;}
div{
	display: table;
	width: 600px;
	line-height: 32px;
  margin: 200px;
	background-color: #fff;
	white-space: nowrap;
	border-spacing: 10px 0;
}
div:before,
div:after{
	display: table-cell;
	content: '';
	width: 50%;
	background: -webkit-linear-gradient(#eee,#eee) repeat-x left center;
	background: linear-gradient(#eee,#eee) repeat-x left center;
	background-size: 1px 1px;
}