介绍一个牛X的样式counter

<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style type="text/css">
body{counter-reset:liu}
.after:after{content:counter(liu)}
input:checked{counter-increment:liu}
</style>
</head>
<body>
	<input type="checkbox">
<input type="checkbox">
<input type="checkbox">
<input type="checkbox">
<input type="checkbox">
<input type="checkbox">
<input type="checkbox">
  <span class="after"></span>
	
</body>
</html>

  

原文地址:https://www.cnblogs.com/liuhao-web/p/6379003.html