CSS如何实现文字隐藏 超出文字隐藏 鼠标移入显示

时间:2021-02-12 23:47:44
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<style type="text/css">
			span{
				display: inline-block;
				width:60px;
				word-break: keep-all;
				overflow: hidden;
				text-overflow: ellipsis;
			}
			span:hover{
				overflow: visible;
			}
		</style>
	</head>
	<body>
		<div>
			<span>
				欢迎光临本寒舍啊哈哈哈哈啊哈哈哈
			</span>
		</div>
	</body>
</html>