首先想到的是,请不要回答“使用border-radius + css3pie或jquery插件”:我知道还有其他方式可以用css3来做到这一点,但我不介意。如何更好地使用图片/边框的网格代码?
这是我的全部代码:
.menu_books_top-bottom { width:171px; height:7px; background-color:#76614C; float:left;}
.menu_books_center { width:155px; background-color:#76614C; padding:10px 15px 10px 15px; float:left;}
.menu_books_top-left {width:7px; height:7px; background-image:url(../images/borders/menu_books_top-left.png); float:left;}
.menu_books_top-right {width:7px; height:7px; background-image:url(../images/borders/menu_books_top-right.png); float:left;}
.menu_books_bottom-right {width:7px; height:7px; background-image:url(../images/borders/menu_books_bottom-right.png); float:left;}
.menu_books_bottom-left {width:7px; height:7px; background-image:url(../images/borders/menu_books_bottom-left.png); float:left;}
<div class="menu_books_top-left"> </div>
<div class="menu_books_top-bottom"> </div>
<div class="menu_books_top-right"> </div>
<div class="menu_books_center">
Content
</div>
<div class="menu_books_bottom-left"> </div>
<div class="menu_books_top-bottom"> </div>
<div class="menu_books_bottom-right"> </div>
但正如你所看到的,它没有看起来那么好!还有其他方法可以做到这一点吗?或者我可以更好地使用这些代码(如经典方法)?
Here你可以找到一个例子。 (红色=带边框的图像)
这将有助于如果你可以做一个[的jsfiddle测试用例(http://jsfiddle.net/)和[http://dummyimage.com/](http://更换相同尺寸的,图像dummyimage.com/)。 – thirtydot 2011-05-14 14:12:25
严正。不知道怎么办边防与虚拟图像:) – kwichz 2011-05-14 14:17:01
的例子已经加入:) – kwichz 2011-05-14 14:35:23