[英]Expand a element to fill li
I'm trying to expand the a
elements of this jsfiddle to fill the li
element, but display:block
does not work as I'm using a table to space them. 我正在尝试扩展此jsfiddle的
a
元素以填充li
元素,但是display:block
无法正常工作,因为我正在使用表格来隔开它们。
How can this be done in order for my colored corners to work? 如何才能使我的彩色角工作? As I've got a background set on both
a
and the li
elements to give the illusion of colored corners. 因为我在
a
和li
元素上都设置了背景,以给出彩色角的错觉。
Add a height
parameter to your a
tag so it fills the entire height of the li
: a
标签中添加height
参数,以使其填充li
的整个高度:
.menu a {
font-size: 11px;
color: #FFFFFF;
display: block;
background: #000;
padding: 5px 20px;
-webkit-border-radius: 0px 0px 10px 0px;
border-radius: 0px 0px 10px 0px;
text-transform: uppercase;
height:100%;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.