css3 實作右箭頭→

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <style> .divtest{ position: absolute; top: 100px; left: 100px; height: 3px; width: 10px; padding-left: 30px; background: red; line-height: 40px; } .divtest:before{ content: ''; position: absolute; top: -3px; right: -1px; width: 7px; height: 7px; border-top: 2px solid red; border-right: 2px solid red; transform: rotate(45deg); } </style> <body> <div class="divtest"> <!-- 這是一個箭頭 --> </div> </body> </html>
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/92004.html
標籤:Html/Css
下一篇:Ajax獲取網頁添加到div中
