我的设计师在边角处设计了一个菱形边框.见下图.

我实现这一目标的方法是将钻石形状保存为图像,创建1px实心边框,然后将钻石形状放置在四个角上.虽然这有效但我确信有一个更聪明的方法可以做到这一点,而无需额外的标记.
也许使用类似的东西:在css之后?我该怎么做,还是有更好的方法?我需要与IE8 +兼容,但如果它与IE7 +一起工作甚至更好.
我有一个DIV,周围有一个红色虚线边框:

DIV的HTML:
<div id="certificate" style="text-align:center;display:none;">
<img src="imgflo_topleft.png" id=img1 />
<img src="imgflo_bottomleft.png" id=img2 />
<img src="imgflo_topright.png" id=img3 />
<img src="imgflo_bottomright.png" id=img4 />
//OTHER texts will go here but it should not interfere with the images
</div>
Run Code Online (Sandbox Code Playgroud)
CSS:
#certificate {
width: 900px;
margin: 0px auto;
border: 2px dotted red;
padding-right: 5px;
padding-left: 5px;
text-align: center;
}
Run Code Online (Sandbox Code Playgroud)
要放在DIV每个角落的图像:

结果:
