Html 带有目标链接的下拉列表
我有一个带有下拉菜单的页面,与主引导4.3.1导航分离,用于链接页面上的各个部分。 下拉列表HTML为:Html 带有目标链接的下拉列表,html,css,Html,Css,我有一个带有下拉菜单的页面,与主引导4.3.1导航分离,用于链接页面上的各个部分。 下拉列表HTML为: <a class="dropdown-item" href="#map-section">Map</a> linking to <section id="map-section"> or <target id="map-section"> 在CSS中也尝试了用部分代替目标。链接指向该区域,但100px的高度不起作用 有什么建议吗?有两件事:
<a class="dropdown-item" href="#map-section">Map</a> linking to <section id="map-section"> or <target id="map-section">
在CSS中也尝试了用部分代替目标。链接指向该区域,但100px的高度不起作用
有什么建议吗?有两件事:
!重要信息
至css。像这样:
#target:before {
content:"";
display:block;
height: 100px !important;
margin: -100px 0 0 !important;
}
!重要信息
属性将覆盖为此元素指定的所有其他选项,并使元素具有与一起定义的唯一值!重要信息
你说“定位错误的引导元素”是什么意思?我甚至尝试过将CSS放在页面上,但没有结果。
#target:before {
content:"";
display:block;
height: 100px; /* fixed header height*/
margin: -100px 0 0; /* negative fixed header height */
}
#target:before {
content:"";
display:block;
height: 100px !important;
margin: -100px 0 0 !important;
}