我已经创建了一个图像来说明我的问题:圆形按钮 - 如何STRETCH时里面的文字全宽
正如你所看到的。我有一个大的圆形按钮。它由3个图像组成。一张图片在右侧,另一张在左侧,另一张在中间。
左右图像相当宽,因为按钮中有一个渐变,所以我不能让它们只有5px宽。现在的问题是,里面的文本仅限于中间区域。我希望它横跨整个按钮。
这里是我的风格:
#index-navigation ul li a {
height: 96px;
line-height: 96px;
text-decoration: none;
font-weight: bold;
font-size: 1em;
color: #333;
background: url('/images/[email protected]') right center no-repeat;
padding-right: 100px;
}
#index-navigation ul li a span.left {
background: url('/images/[email protected]') left center no-repeat;
padding-left: 100px;
}
#index-navigation ul li a span.middle {
background: url('/images/[email protected]') left center repeat-x;
}
如何编辑风格能有锚采取按钮的整个宽度?就像这样:
为什么不这样做呢? http://jsfiddle.net/Qc9cU/2/ –
@EricFortis,可能是因为图像不仅仅是一个圆形的边框? – Qtax