应该有很多方法来实现,这里提供的办法就是创造一个边框,然后用两个三角覆盖。效果如下:
为了方便理解,我给body加了个黑色背景,是这样:
代码如下:
带三角缺口的边框 .out { display:block; width:0; height:0; border-left:6px dashed transparent; border-right:6px dashed transparent; border-top:0; border-bottom:7px solid #ccc; position:relative; top:-7px; left:50%;}.inner { position:absolute; border-left:6px dashed transparent; border-right:6px dashed transparent; border-top:0; border-bottom:7px solid #fff; left:-6px; top:2px;}div { position:relative; margin:0 auto; width:80px; height:100px; border:1px solid #ccc; border-radius:5px;}
查看更多关于带三角缺口的边框_html/css_WEB-ITnose的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did106322