DIV CSS 佈局教程網

 DIV+CSS佈局教程網 >> 網頁腳本 >> CSS入門知識 >> CSS詳解 >> CSS打造無圖片帶箭頭的DIV方框
CSS打造無圖片帶箭頭的DIV方框
編輯:CSS詳解     
  1. <Html>
  2. <head>
  3. <title>純CSS無圖片帶箭頭的DIV方框</title>
  4. <style>
  5. div.container{position:absolute;
  6. top:30px;
  7. left:40px;
  8. font-size: 9pt;
  9. display:block;
  10. height:100px;
  11. width:200px;
  12. background-color:transparent;
  13. *border:1px solid #666;
  14. }
  15. s{
  16. position:absolute;
  17. top:-20px;
  18. *top:-22px;
  19. left:20px;
  20. display:block;
  21. height:0;
  22. width:0;
  23. font-size: 0; 
  24. line-height: 0;
  25. border-color:transparent transparent #666 transparent;
  26. border-style:dashed dashed solid dashed;
  27. border-width:10px;
  28. }
  29. i{position:absolute;
  30. top:-9px;
  31. *top:-9px;
  32. left:-10px;
  33. display:block;
  34. height:0;
  35. width:0;
  36. font-size: 0;
  37. line-height: 0;
  38. border-color:transparent transparent #fff transparent;
  39. border-style:dashed dashed solid dashed;
  40. border-width:10px;
  41. }
  42. .content{
  43. border:1px solid #666;
  44. -moz-border-radius:3px;
  45. -webkit-border-radius:3px;
  46. position:absolute;
  47. background-color:#fff;
  48. width:100%;
  49. height:100%;
  50. padding:5px;
  51. *top:-2px;
  52. *border-top:1px solid #666;
  53. *border-top:1px solid #666;
  54. *border-left:none;
  55. *border-right:none;
  56. *height:102px;
  57. box-shadow: 3px 3px 4px #999;
  58. -moz-box-shadow: 3px 3px 4px #999;
  59. -webkit-box-shadow: 3px 3px 4px #999;
  60. /* For IE 5.5 - 7 */
  61. filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='#999999');
  62. /* For IE 8 */
  63. -ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='#999999')"; 
  64. }
  65. </style>
  66. </head>
  67. <body>
  68. <div class="container">
  69. <div class="content"><br>這是框中的文字,可動態顯示。高度自動增加,應該不錯吧^_^</div>
  70. <s>
  71. <i></i>
  72. </s>
  73. </div>
  74. <br />
  75. </body>
  76. </Html>
XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved