< A>的填充属性。 [英] Padding property for <A>

查看:74
本文介绍了< A>的填充属性。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据我的书,padding属性是为所有元素定义的。

但是,当我为元素< A>设置属性时,只剩下

正确填充,而不是顶部和底部填充。


我检查了几个其他浏览器,但是找不到任何

实现< A>的顶部和底部填充。元素,假设我已经

正确完成。


#bar A

{

padding :10px 10px 10px 10px

}


随机选择px单位。


有何评论?我的书错了吗?


-

== Eric Gorr ========= http://www.ericgorr.net ========= ICQ:9293199 ===

因此,智能的考虑总是包括

福利和伤害。 - 孙子

==侮辱,就像暴力一样,是无能的最后避难所...... ===

解决方案

< blockquote> Eric写道:

根据我的书,padding属性是为所有元素定义的。
但是,当我为元素< A>设置属性时,只应用左边的
右边填充而不是顶部和底部填充。




顶部和底部填充应用于字体高度(不是行高) )

的链接文字。如果超链接内容不是文本,也适用于

图像IIRC。


-

Spartanicus


Spartanicus< me@privacy.net>写道:

Eric写道:

根据我的书,padding属性是为所有元素定义的。
但是,当我为元素< A>设置属性,只应用左边的
右边距填充而不是顶部和底部填充。



应用顶部和底部填充关于链接文本的字体高度(不是行高)
如果超链接内容不是像图像IIRC那样的文本,也适用。




不幸的是,我对如何使这项工作感到茫然。你有

的建议吗?


另外,你有一个URL可以找到上述信息吗?


谢谢。


-

== Eric Gorr ========= http://www.ericgorr.net ========= ICQ:9293199 ===

因此,对智能的考虑总是包括

福利和伤害。 - 孙子

==侮辱,就像暴力一样,是无能的最后避难所... ===


Eric写道:< br>

顶部和底部填充应用于链接文本的字体高度(不是行高)。如果超链接内容不是像图像IIRC那样的文本,也适用。
不幸的是,我对如何使这项工作感到茫然。你有
建议吗?




做些什么工作?

另外,你有一个URL,上面的信息可以在哪里被发现?



http://w3.org


-

Spartanicus


According to my book, the padding property is defined for all elements.
However, when I set the property for the element <A>, only the left the
right padding is applied and not the top and bottom padding.

I checked a couple of other browsers and couldn''t find any that
implemented top and bottom padding for the <A> element, assuming I have
done it correctly.

#bar A
{
padding:10px 10px 10px 10px
}

Just choose px units at random.

Any comments? Is my book wrong?

--
== Eric Gorr ========= http://www.ericgorr.net ========= ICQ:9293199 ===
"Therefore the considerations of the intelligent always include both
benefit and harm." - Sun Tzu
== Insults, like violence, are the last refuge of the incompetent... ===

解决方案

Eric wrote:

According to my book, the padding property is defined for all elements.
However, when I set the property for the element <A>, only the left the
right padding is applied and not the top and bottom padding.



Top and bottom padding is applied on the font height (not line height)
of linked text. Also applies if the hyperlinked content is not text like
an image IIRC.

--
Spartanicus


Spartanicus <me@privacy.net> wrote:

Eric wrote:

According to my book, the padding property is defined for all elements.
However, when I set the property for the element <A>, only the left the
right padding is applied and not the top and bottom padding.



Top and bottom padding is applied on the font height (not line height)
of linked text. Also applies if the hyperlinked content is not text like
an image IIRC.



Unfortunately, I am at a loss then on how to make this work. Do you have
suggestions?

Also, do you have a URL for where the above information can be found?

Thank you.

--
== Eric Gorr ========= http://www.ericgorr.net ========= ICQ:9293199 ===
"Therefore the considerations of the intelligent always include both
benefit and harm." - Sun Tzu
== Insults, like violence, are the last refuge of the incompetent... ===


Eric wrote:

Top and bottom padding is applied on the font height (not line height)
of linked text. Also applies if the hyperlinked content is not text like
an image IIRC.
Unfortunately, I am at a loss then on how to make this work. Do you have
suggestions?



Make what work?
Also, do you have a URL for where the above information can be found?



http://w3.org

--
Spartanicus


这篇关于&lt; A&gt;的填充属性。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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