a {
margin-left: 20px;
float: right;
text-decoration: none;
margin: 0px;
padding: 0px;
}
img {
border: 0px none;
margin: 0px;
padding: 0px;
}
没有定义高宽,做出来a的高度要比img高1个像素的样子
回复讨论(解决方案)
a {display:block}
只是定义display:black没用,要加上宽度和高度才行
还有没有其他办法啊,不想加宽度和高度,那样麻烦很
是四个边都要高1像素?还是只有上面高1像素?
根据我理解的意思是四边的A标签边距比IMG的要高1像素,不知道是不是这样的?
a{
padding:1px 1px 1px 1px;
float: right;
text-decoration: none;
margin: 0px;
border:1px #FF0000 solid;
}
img{
border: 0px none;
margin: 0px;
padding: 0px;
border:1px blue solid;
}
修改padding值即可。
不知道有没有帮到你!
查看更多关于a标签套img高了一个像素_html/css_WEB-ITnose的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did105250