DIV+CSS实现带三角箭头的提示框

实现效果

DIV+CSS实现带三角箭头的提示框

实现代码

CSS Code复制内容到剪贴板
  1. <!DOCTYPE html>   
  2. <html>   
  3.   <head>   
  4.     <meta charset="UTF-8">   
  5.     <link rel="shortcut icon" href="resources/img/logo-color.png" type="image/x-icon">   
  6.     <title>测试</title>   
  7.     <style>   
  8.     .out-div {   
  9.         color#FFFFFF;   
  10.         font-size16px;   
  11.         line-height40px;   
  12.         displayinline-block;   
  13.         height40px;   
  14.         width200px;   
  15.         text-aligncenter;   
  16.         border-radius: 5px;   
  17.         margin-left32px;   
  18.         vertical-aligntop;   
  19.         background-colormaroon;   
  20.     }   
  21.     .arrow {   
  22.         width0px;   
  23.         height0px;   
  24.         border-top10px solid transparent;   
  25.         border-right10px solid;   
  26.         border-bottom10px solid transparent;   
  27.         positionabsolute;   
  28.         margin-left: -10px;   
  29.         margin-top10px;   
  30.         border-right-colormaroon;   
  31.     }   
  32.     </style>   
  33.   </head>   
  34.   <body>   
  35.     <div class="out-div">   
  36.         <div class="arrow" ></div>   
  37.         <span>这是一个提示框</span>   
  38.     </div>   
  39.   </body>   
  40. </html>  

以上所述是小编给大家介绍的DIV+CSS实现带三角箭头的提示框 ,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对网站的支持!