1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
   | <style>   div {     position: relative;     width: 300px;     height: 50px;     background-color: #bbb;     padding: 4px;   }   div:before {     content: "";     position: absolute;     left: 0;     top: -2px;     width: 50%;     height: 2px;     background-color: red;   } </style> <div>请看这个div的“上边框”是只有一半的</div>
   |