Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google chrome 为什么我的锚定填充在webkit浏览器上不起作用?_Google Chrome_Safari_Webkit_Anchor_Padding - Fatal编程技术网

Google chrome 为什么我的锚定填充在webkit浏览器上不起作用?

Google chrome 为什么我的锚定填充在webkit浏览器上不起作用?,google-chrome,safari,webkit,anchor,padding,Google Chrome,Safari,Webkit,Anchor,Padding,我有一个导航使用锚标签 这是非常基本的,在每个部分之前,我使用 <a id="myid" class="anchor"></a> 防止我的粘性导航重叠每个部分(我的导航高度为45像素) 我的问题是:虽然它在FF上运行良好,但Chrome和Safari似乎忽略了我设置的填充顶部 如果这是一个基本/新问题,很抱歉,但我找不到答案 谢谢你的帮助 将显示:内联块添加到.anchor CSS中 将显示:内联块添加到.anchor CSS中 旁注:与李氏see配合使用。非常感谢!

我有一个导航使用锚标签

这是非常基本的,在每个部分之前,我使用

<a id="myid" class="anchor"></a> 
防止我的粘性导航重叠每个部分(我的导航高度为45像素)

我的问题是:虽然它在FF上运行良好,但Chrome和Safari似乎忽略了我设置的填充顶部

如果这是一个基本/新问题,很抱歉,但我找不到答案


谢谢你的帮助

显示:内联块添加到.anchor CSS中


显示:内联块添加到.anchor CSS中


旁注:与李氏see配合使用。非常感谢!虽然(对我来说)奇怪的是,没有显示:inline block-FF不会“添加”45px,它只会“移动”45px(如果我清楚的话,我不知道…:s)。无论如何,我会使用display:inline块,即使它在我的设计中增加了45px再次感谢您的快速回复!!我正在运行Firefox 15(有一段时间没有更新),它的工作原理与Safari和Chrome中的相同——没有显示,没有可见的填充:inline block。你可能处于怪癖模式吗?旁注:与李的用法见。非常感谢!虽然(对我来说)奇怪的是,没有显示:inline block-FF不会“添加”45px,它只会“移动”45px(如果我清楚的话,我不知道…:s)。无论如何,我会使用display:inline块,即使它在我的设计中增加了45px再次感谢您的快速回复!!我正在运行Firefox 15(有一段时间没有更新),它的工作原理与Safari和Chrome中的相同——没有显示,没有可见的填充:inline block。你可能处于怪癖状态吗?
.anchor {padding-top: 45px;}