需求:左边带数字的列表
思路:
1.ol css设置属性: counter-reset: my-counter; list-style: none;
2.li css设置属性: `
li::before {
content: counter(my-counter);
counter-increment: my-counter;
display: block;
float: left;`
}
demo代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.search_window {
position: absolute;
top: 53px;
left: 0;
width: 436px;
heigh