相关疑难解决方法(0)

在四个角上将角图像添加到DIV边框的智能方法

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

钻石边框

我实现这一目标的方法是将钻石形状保存为图像,创建1px实心边框,然后将钻石形状放置在四个角上.虽然这有效但我确信有一个更聪明的方法可以做到这一点,而无需额外的标记.

也许使用类似的东西:在css之后?我该怎么做,还是有更好的方法?我需要与IE8 +兼容,但如果它与IE7 +一起工作甚至更好.

css border

13
推荐指数
1
解决办法
1万
查看次数

在DIV的四个角上附加图像

我有一个DIV,周围有一个红色虚线边框: 空白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每个角落的图像:

图像放置没有每个角落

结果: 结果

html css

1
推荐指数
1
解决办法
5635
查看次数

标签 统计

css ×2

border ×1

html ×1