html - 固定导航栏下的锚点消失
问题描述
我的锚点在我的固定导航栏下消失了这个经典问题。我在 stackoverflow 上尝试了各种解决方案,但都没有奏效。我正在使用弹性盒。因为它是用于 fcc 分配,所以我现在想保留原版 html/css。没有引导程序或 JS。
我还想把我的 flexbox 放在一块 4 个相邻的正方形中。
这可能吗?
我的代码笔在这里。
<main>
<div class="flex-container">
<div id="womens"class="anchor">Women's</div>
<div id="mens" class="anchor">Men's</div>
<div id="apparel" class="anchor">Apparel</div>
<div id="accessories" class="anchor">Accessories</div>
</div>
<div id="reviews" class="anchor">
<h2>PRODUCT REVIEWS</h2><iframe width="560" height="315" id="video" src="https://www.youtube.com/embed/S1ny0G1FaDI" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe></div>
<div class="grid-item"><h2>SUBSCRIBE</h2>
<p>If you would like to be kept upto date with our latest news, products and offers, enter your email address in the space below.</p>
</div>
解决方案
推荐阅读
- c# - Visual Studio 构建 - 路径中的逗号问题
- java - Spring Boot Jersey 自动配置
- c++ - 转换此函数以读取整个文件
- cytoscape.js - 如何使边缘的标签显示在中间位置?
- python - 类型错误:序列项 0:预期的 str 实例,在尝试打印列表时引发 int
- java - 使用绘制的 bufferedImage 调整 JFrame 大小时 Java 崩溃
- android - 使用手机运行应用时,Android 组件位置不匹配
- javascript - 制作一个球从屏幕一侧反弹而没有反弹的游戏
- visual-studio - 串口过滤返回
- java - 如何配置 Spring Boot 以同时使用 Vault 和属性文件?