文本属性之装饰文本(CSS、HTML)

蔚落 2023-10-03 12:34 133阅读 0赞

文本属性之装饰文本(CSS、HTML)

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>文本属性之装饰文本</title>
  7. <style>
  8. div {
  9. /* 下划线 */
  10. /* text-decoration: underline; */
  11. color: red;
  12. /* 删除线 */
  13. /* text-decoration: line-through; */
  14. /* 上划线 */
  15. text-decoration: overline;
  16. }
  17. /* 取消a默认的下划线*/
  18. a {
  19. text-decoration: none;
  20. }
  21. </style>
  22. </head>
  23. <body>
  24. <div>程序员</div>
  25. <a href="#">程序员</a> <!-- 存在下划线 -->
  26. </body>
  27. </html>

发表评论

表情:
评论列表 (有 0 条评论,133人围观)

还没有评论,来说两句吧...

相关阅读

    相关 文本属性

    1)字体大小:font-size:12px 2)字体的类型:\{font-family:字体1,字体2,;\} 3)文本颜色:\{color:颜色值;\} 4)字体