1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
| root 是颜色变量 :root { --theme-accent-color: rgb(142, 212, 149); --theme-accent-color--rgb: 142, 212, 149; --theme-secondary-color: rgb(24, 127, 245); --theme-secondary-color--rgb: 24, 127, 245; --theme-text-color: rgb(44, 62, 80); --theme-text-color--rgb: 44, 62, 80; --theme-success-color: rgb(35, 165, 94); --theme-info-color: rgb(122, 157, 255); --theme-warn-color: rgb(255, 180, 4); --theme-danger-color: rgb(255, 114, 114); --theme-empty-color: rgb(185, 185, 185); --theme-link-color: rgb(63, 81, 181); --theme-accent-link-color: rgb(255, 255, 255); --theme-background-color: rgb(248, 248, 248); --theme-border-color: rgb(218, 218, 218); --theme-button-color: rgb(37, 180, 73); --theme-button-color--hover: #2bd155; --theme-button-color--active: #219e40; --theme-card-background-color: rgba(255, 255, 255); --theme-card-background-color--rgb: 255, 255, 255; --theme-card-box-shadow: 0 0 .5rem rgba(0, 0, 0, .1); --theme-card-box-shadow--hover: 0 0 .85rem rgba(0, 0, 0, .2); --theme-card-border-color: rgb(230, 230, 238); --theme-header-background-color: rgb(255, 255, 255); --theme-header-box-shadow-color: rgb(238, 239, 241); --theme-footer-top-color: rgb(251, 251, 252); --theme-footer-bottom-color: #e7e7ed; --theme-input-background-color: rgb(245, 245, 245); --theme-input-border-color: rgb(222, 222, 222); --theme-input-border-color--hover: #e1e1e1 } h2:before { width: .25em; height: 70%; background-color: rgb(142, 212, 149); } h3:before { width: .2em; height: 60%; background-color: rgba(var(--theme-accent-color--rgb),.85); } h1:before,h2:before,h3:before,h4:before,h5:before,h6:before { content: ""; display: block; position: absolute; top: 50%; left: 0; transform: translateY(-50%); border-radius: 1em; } h2,h3{ font-weight: 700; padding: .2rem; color: var(--theme-text-color); position: relative;/* 重要元素 */ } h2 { border: 0; font: inherit; font-size: 1.6em; margin: 1rem 0; padding-left: 1rem; vertical-align: baseline; } h3 { font-size: 1.3rem; margin: .5em 0; padding-left: .8rem; }
<h2>标题</h2>
|