css 指向下一个的箭头怎么做

html-css035

css 指向下一个的箭头怎么做,第1张

就用div加css就能做出这种效果了.给你一个刚写的例子。

<div style='background:redheight:20pxwidth:30pxdisplay: inline-block'></div>

<div style='top:5pxheight: 0pxborder: 15px red solidwidth: 20pxborder-top-color: transparentborder-right-color: transparentborder-bottom-color: transparentdisplay: inline-blockposition: relativeleft: -4px'></div>

div覆盖着另一个div,是因为其中一个或者两个脱离了文档流。常见脱离文档流主要原因有:

div浮动造成,常用解决方法是清除浮动

div受到相对定位或者绝对定位的影响,定位是可以设置left,right,bottom,top,等位置样式的,解决方法一般是清除定位,或者解决兼容性,合理控制left,right ,bottom,top四个属性的值。

另外还有一种不常见的情况,例如margin的负数值,可以造成div偏离原来的位置,建议合理设置即可。