列表元素中的锚定不填充具有显示的可用空间:块和高度/宽度设置为100% [英] Anchor in list elements not filling available space with display:block and height/width set to 100%

查看:130
本文介绍了列表元素中的锚定不填充具有显示的可用空间:块和高度/宽度设置为100%的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



/jsfiddle.net/nmxmT/rel =nofollow> http://jsfiddle.net/nmxmT/



看不到我的done wrong:(

解决方案

将填充位置放在 a li ,并取下 a 的宽度。



http://jsfiddle.net/Gb38x/


In the fiddle below i would like to the anchor elements to occupy all of the aviailable space of their parent li elements:

http://jsfiddle.net/nmxmT/

Can't see what i have done wrong :(

解决方案

Put the padding on the a instead of the li and take the width off of the a.

http://jsfiddle.net/Gb38x/

这篇关于列表元素中的锚定不填充具有显示的可用空间:块和高度/宽度设置为100%的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆