3_css3基础.html 726 B

1234567891011121314151617181920212223242526272829
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>Document</title>
  8. <style>
  9. #div1{
  10. width: 200px;
  11. height: 200px;
  12. background: pink;
  13. white-space: nowrap;/* 强制不换行 */
  14. overflow: hidden;
  15. text-overflow: ellipsis;/* 文本溢出... */
  16. text-shadow: 5px 5px 5px red;
  17. border-radius: 10px;
  18. box-shadow: 2px 15px 30px #ccc;
  19. }
  20. </style>
  21. </head>
  22. <body>
  23. <div id="div1">
  24. 哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈
  25. </div>
  26. </body>
  27. </html>