答案 0 :(得分:6)
为物品提供2px透明边框:http://jsfiddle.net/mkTvp/1/
答案 1 :(得分:1)
只需将边框添加到与背景颜色相同的原始样式:
li {
display: block;
float: left;
padding: 3px;
border: 2px solid #fff; /*same as background color*/
}
答案 2 :(得分:0)
a {
background-color: #F78F1E;
color: #fff;
display: block;
font-family: helvetica, sans-serif;
font-size: 0.688em;
font-weight: bold;
padding: 12px 12px;
text-decoration: none;
text-transform: uppercase;
width: auto;
}
li {
display: block;
float: left;
padding: 1px;
border: 2px solid white; /** Same as background-color */
}
li:hover { border: 2px dashed #F78F1E;}